{"_id":"react-use-signals","_rev":"33-2af20c333b4f39f0cd64f38214d3fe1b","name":"react-use-signals","dist-tags":{"latest":"1.7.7","alpha":"1.4.1"},"versions":{"1.0.0":{"name":"react-use-signals","version":"1.0.0","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@types/react":"^18.2.38","prettier":"^3.1.0","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.0.0","gitHead":"8875c313d9e997683f80ab4b55a2cf55b4cafb03","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-E2SzpZjzb8VHraTv9JrMvOPrLHO/lyBvUVuNusIUIgRe/6qihcLog35OW6BHvIHxEJQQKQ3PH23AIvucpEP1zw==","shasum":"2befeeb0e4a1810aaad2c5d0e74388d130b1144e","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.0.0.tgz","fileCount":9,"unpackedSize":10849,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEr+8lwdA3Ts6k9r8vbsxax/GgmW87ZSoELLy5piUwPgIgCVqgt3Tzxiie6PiXm8OKMnmRY35CDoHRkbDwPnj8uto="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.0.0_1700772143301_0.14353404075371157"},"_hasShrinkwrap":false},"1.1.0":{"name":"react-use-signals","version":"1.1.0","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@types/react":"^18.2.38","prettier":"^3.1.0","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.1.0","gitHead":"8875c313d9e997683f80ab4b55a2cf55b4cafb03","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-vw5GgGl78RrjzCQSXf2eg4u2k2lXx5kvkdRlSorSxBDNp3Zi8f+sLvwpEqAN9FtgrMiVDHXx5eRFbrmc0+bv3w==","shasum":"30d181ea2a84b2295a6793de606a55b47e5f5298","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.1.0.tgz","fileCount":9,"unpackedSize":10849,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5u0QMq4KfzNsKev7TCOnRafiYdVa8c3NTOO3giMUPDAiEA9R8KIUTnC4plPBbeMKplbJ3gcQpPldClCXWg9h5HcFI="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.1.0_1700772732510_0.0073874332011441"},"_hasShrinkwrap":false},"1.1.1":{"name":"react-use-signals","version":"1.1.1","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@types/react":"^18.2.38","prettier":"^3.1.0","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.1.1","gitHead":"8875c313d9e997683f80ab4b55a2cf55b4cafb03","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-L1CE1YYLghLoi+0d0Hj9iwFaCARKAsvGT2vKrGKG9ikTeA+tC6IXDtuDdXbLTjmhxb41KtumBZHm69fsh7zqOg==","shasum":"0b32d4390650ac6a99749c48f0653ceb0d44a438","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.1.1.tgz","fileCount":9,"unpackedSize":11280,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxtg+tTwjxP16VVYrRRvfgq4w9b28dtiOhrVF7h9gH0QIhAPeMkd28q2Dxs/NOcf3WezcOLYCFK3wPO+9db74ng7Ci"}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.1.1_1700773046955_0.9164549392332004"},"_hasShrinkwrap":false},"1.2.1":{"name":"react-use-signals","version":"1.2.1","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@types/react":"^18.2.38","prettier":"^3.1.0","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.2.1","gitHead":"8875c313d9e997683f80ab4b55a2cf55b4cafb03","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-qC5gfszoJC5nLikasf+hs6Wwc1uUYPj7YY1EBVTq5EYc6WWbdOtczPM7bsrCwXNEYUcpQhDVgJpGVI8RpAbBWQ==","shasum":"8470ee3eff761cddd250130681c2fc085361a365","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.2.1.tgz","fileCount":9,"unpackedSize":11443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQCyl1cF6MIKb5OjdGFLzQJ/WWY2R3OmdhCb/OikEoIAiBCMOJZVGkng6FxTfiAIotK9goIBaVImLi5B7q/Ra3Atw=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.2.1_1700773215549_0.3550500609147975"},"_hasShrinkwrap":false},"1.3.0":{"name":"react-use-signals","version":"1.3.0","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","publish":"npm run test && npm run build && npm publish"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.0","gitHead":"15d971697bebf1bb6fb0cf7eb7705eab913e0c66","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-ToHj9O1AQfPh4waavHF/f8z0RA/D/qWwbeZxl8CPnZQ2m1sMCtsnHKAcr+4GAnRLK76DPVhbIDF/BgGnbdWobA==","shasum":"feb0cd960a3ebf760bb864c33d4ac6bbbe6b45ec","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.0.tgz","fileCount":11,"unpackedSize":12655,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA1urZc7daypPvzcDtIOD6XEmJ0xI+BNMrihLgb0B59ZAiEAobNY0dnU8hI+DgHPQGIQqQkXAxOiP1gYBRnDtu8FFqk="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.0_1700834914614_0.2849535705769415"},"_hasShrinkwrap":false},"1.3.1":{"name":"react-use-signals","version":"1.3.1","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.1","gitHead":"15d971697bebf1bb6fb0cf7eb7705eab913e0c66","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-o6JgF7NGGVdPWtHE8ULKPK4wO+8Uy0AM8uhMe5Kz1YSu/oV7hIALS7s8XMuSDYKHbvIRFNVPw/q/sRXQcVHECg==","shasum":"b040ec49146c3544c94dfb2980a05e0b86df1871","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.1.tgz","fileCount":11,"unpackedSize":12592,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqXfPxpbEGzzRNIKBV2day2vrh7RWDaeVb6zJxlpXlCAIhAMf1MQANU7gKezzhr7sHIk5J+bWYUdUfDqq1HE44drJp"}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.1_1700834978707_0.7210953163795999"},"_hasShrinkwrap":false},"1.3.2":{"name":"react-use-signals","version":"1.3.2","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.2","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"2eba34e5738df2181d1fceeb5fb9f7539afdb696","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-M0A2kzQiU46IBQbKFgp+tm/8GdcJ/XDdoEDxTQLm9VcH1e/YbGHa3edB58gvi2oNAdSsEBfkaRf3NGfU9idQTg==","shasum":"999c9e947a54015b60433df4cf9e1086d51064e8","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.2.tgz","fileCount":11,"unpackedSize":12639,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmAuhca66Cy96KqtETagcMg7sh3xLnFuRNnDpO9eXmMAiEAyoNiJrNGlOEUJjImlkUIMCYccnV8utMgsWv8bjNij70="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.2_1700931104654_0.8846870845045449"},"_hasShrinkwrap":false},"1.3.3":{"name":"react-use-signals","version":"1.3.3","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.3","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"2eba34e5738df2181d1fceeb5fb9f7539afdb696","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-CB6aZfoVp0StrMqNKpTPXTsXOn0Yr0PxuC0NTr//r4NivWBGjiQeJfnpEIEdJLCKKaLQ1EwpM+A/sqzC6GTxbw==","shasum":"2d5844c65216f06796271bc8c8b873527c2bdd94","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.3.tgz","fileCount":11,"unpackedSize":13653,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtuFxx3+HJcI4hLb3N5WLsUq+JE9qA3i7NB3a3EuNFkwIgfcg5mzyfD09KxctEr8ndC81SbNzQuee5WlrtMAdThWE="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.3_1700931319534_0.6111331601803474"},"_hasShrinkwrap":false},"1.3.5":{"name":"react-use-signals","version":"1.3.5","description":"A generic signals based state management package for React JS","scripts":{"build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.5","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"2eba34e5738df2181d1fceeb5fb9f7539afdb696","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-9Z/LAUXvRC4QBIVNeQEcaOtjJ/IlnfnQ8Y+7b8E/CDL2mlJ9zvluXdyrjy88gL+/s1MDj6kWsY7Etlk2MkTqDg==","shasum":"ba4d5628061ac6b53e4eceedfe07dd86b27aa441","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.5.tgz","fileCount":11,"unpackedSize":13653,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICRwox125vKnOnB3PjRe5FbyLmq7fEAbZh+x9YL/gtJdAiEArYedsKGKSHt9hsmqYEtqS/U1hZvpQPM5rOUO3NvAcx0="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.5_1700931429768_0.03425937718652472"},"_hasShrinkwrap":false},"1.3.6":{"name":"react-use-signals","version":"1.3.6","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.6","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"b1c1cf5d68c08fd84a953c45e83bbc9fb4d4e8c5","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-puP3sfRdfR/Md/UZdIS7geseeWu232IKXTwsfYAKCVuo8cAnUOucBdZxqmVjAlEFXE2fmHtgrlXQhgbvZw7J1w==","shasum":"8e2827bef615e4481b1ca290c151902e35a813ea","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.6.tgz","fileCount":11,"unpackedSize":13519,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7iE0aX9yPuTrvggobgVRGH89Ndw1MA5ay1o6Clb0KdAiAPX5CKzO7D0NITUJD25ylgj3sdHN8g7VMlALEm3ii0WQ=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.6_1700933731640_0.8021945209114127"},"_hasShrinkwrap":false},"1.3.7":{"name":"react-use-signals","version":"1.3.7","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.7","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"b1c1cf5d68c08fd84a953c45e83bbc9fb4d4e8c5","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-v0TPFQA60WnYhf8rCq4v6xxHPXM0F+cnHK1gmPm7xYaOxBz0zs5z4k5HIHLUlU1eUfFUWCGFgB5HPTy+Ss7mjQ==","shasum":"6eeaca79161f6ad68789b1c5f5b31560a5f3bc02","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.7.tgz","fileCount":11,"unpackedSize":13482,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwJxOTXRvOz5rAkcIVGCzlt6oXw6zE7i3xcYE3IPlHhAiEA3wsVWsvQjl0pkR9Qs5ifOaoM/WqU4021jiCEWU8Tmi4="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.7_1700933883893_0.767509926451172"},"_hasShrinkwrap":false},"1.3.8":{"name":"react-use-signals","version":"1.3.8","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.8","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"b1c1cf5d68c08fd84a953c45e83bbc9fb4d4e8c5","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-HSms2jMzPkpGEJAWU1cD44Fuoveehdr9+VloHiUafc0u+Vm5HWtF6/T/R2tuxEuTGA4DKO5LexDfWZr4mPZiyg==","shasum":"e8def61316833b2fafd20f9e2dccc07f096c3018","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.8.tgz","fileCount":11,"unpackedSize":13566,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2oZRC0G2TUehPiTUN3lSmU0bco/R0Dv12A3GXN+5CCAiEApnRV221W3ftwbOXXodBzc06C0KQzEdx17sYEOVUUIFE="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.8_1700935129262_0.7786546089393693"},"_hasShrinkwrap":false},"1.3.9":{"name":"react-use-signals","version":"1.3.9","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.3.9","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"b1c1cf5d68c08fd84a953c45e83bbc9fb4d4e8c5","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-/4XMQ+BK+HFLssV14y7lgdpR81LbhnW+zdm9iRD15TyrhKSFE2+L6n4a+rPUj/3B507keD/GZeqK6wDYbCroqA==","shasum":"6d5c9a4597248a3f9d768bf3cda3662d38c333e2","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.3.9.tgz","fileCount":11,"unpackedSize":13612,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZCpD7C4nurthied23PkSt2p/FTLZbUnr2ZmjeNfUg8AiAk4xfyOgjeS6rBQFEO2/Y5hAt74Lxm7kTya3cnGKuvQw=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.3.9_1700936473636_0.8536985828322117"},"_hasShrinkwrap":false},"1.4.0":{"name":"react-use-signals","version":"1.4.0","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.0","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"be142e0f65d76234fc01a3e78fa668a9de2d5107","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-nP1dWu0lpBmm+JeEAsmqOqVqbehnOQdsD+2cZ6MdMDktfxALOMfhYi5N/wPyFm6rg87vI51enmTOlYTCyD6Yvg==","shasum":"f0b197949562a62db66b08ce149ff7a653ab951d","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.0.tgz","fileCount":11,"unpackedSize":13205,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgSlXtV37jzZEKw5ek67+eUiRhNju4jWd9p3Fayd7YwAiBLAiP7Wb4MGQwm7JEigmuKgq4SQatVaYfEVr9kRzNWnA=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.0_1700937743836_0.30956166152053277"},"_hasShrinkwrap":false},"1.4.1":{"name":"react-use-signals","version":"1.4.1","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.1","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n```bash \r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Usage\r\n\r\n### Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n### Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n### Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = (name) => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = (street) => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={(e) => handleUpdateName(e.target.value)}\r\n        />\r\n        <input\r\n          type=\"text\"\r\n          value={user.value.address.street}\r\n          onChange={(e) => handleUpdateStreet(e.target.value)}\r\n        />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n#### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n#### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport {signalEffect} from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n### Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n### Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","gitHead":"be142e0f65d76234fc01a3e78fa668a9de2d5107","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-7j9XWbMu9NjasiG1xXVFugUEmKU5VC8tynOUv+buQLArw0GGDVCEM3kBLK8nWdOaGTmg2u4vENwmi4vbLdbJvg==","shasum":"8125ca5ede5b1571d4dfa5d249793a944bbef78a","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.1.tgz","fileCount":11,"unpackedSize":13758,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfT6/LGW1/mCpzApFULUB9ljO9I8tCAJUp4JoZ09/X3AiA5DnayQYEfoxj8kG6swkMabaRRFA5Xic4maEM6UEOMzg=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.1_1700938002493_0.5599931224288208"},"_hasShrinkwrap":false},"1.4.2":{"name":"react-use-signals","version":"1.4.2","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.2","gitHead":"3b2cca3f926739fb8c05ebf53ab33ee5233883ce","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-oC1jBn3OFxCdXf9JHdLC8jA3b6cldkz6glV1rj2Ht+c8zSosJWgPuneYmUrJ+Hxs76knJtYF5wzF04U/NP3KTA==","shasum":"1728b3598bcd27ddd64d9171f661a7a5d8049a19","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.2.tgz","fileCount":11,"unpackedSize":13758,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBdikOMe1wZ3o7LEHW+wi470kBhPxTdTz6a2tE9vTWC0AiEA1NCNRTvnHBwufkn0hmyjI3ODrHYgoI87vKv4f78aNMc="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.2_1700938126955_0.8036873265888917"},"_hasShrinkwrap":false},"1.4.3":{"name":"react-use-signals","version":"1.4.3","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.3","gitHead":"96ede5ca52d4118e40cfcd1f4b27e02a840cb747","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-MuSLccdACYJDCxxia+R0cuhFl5QzYS2hS98hX069AnhmLg+e3QIYUGLUjKwAJv1W5SrToXeZylBVUGqSzFSlQg==","shasum":"e7f1915174bad5a15ab73aa5a33afdc5b04647a2","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.3.tgz","fileCount":11,"unpackedSize":13751,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb8v5V6kFA8r6VZgIwb57ScjhwLpEzYuW4pfz5g2aTRAIgfUl1RWQgYJ1AkKuR23BnbIsA9M11nW+DvMDVqPY/UDg="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.3_1700940604013_0.7416752250611347"},"_hasShrinkwrap":false},"1.4.4":{"name":"react-use-signals","version":"1.4.4","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.4","gitHead":"96ede5ca52d4118e40cfcd1f4b27e02a840cb747","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-U8czTm3AHIhqjnb0IfF8ltOXYBwQfmTVHhYLMT758wj5+iqiH9jRnPAIoYNUzcDV1U1f2TQ/1WOWl0UDwhO54g==","shasum":"50060ea04b97bc8db916dbbfc5afa4b4f552835e","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.4.tgz","fileCount":11,"unpackedSize":13615,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXPtxY/ciMBtM9ymU/QXQMp3TI+998cdnIzEuoVISW5gIgHiPAzyohn0rOYgRDrp9Elksn/quTHXvKdfxuXKmvX6w="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.4_1700941299499_0.034481417608041465"},"_hasShrinkwrap":false},"1.4.5":{"name":"react-use-signals","version":"1.4.5","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.5","gitHead":"96ede5ca52d4118e40cfcd1f4b27e02a840cb747","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-TV7PjCHHDRGj/wIDEWGHVE3U99u+Vk5Mm0WHsVfAzLYXXiv7vdjOtz+R5QjM35Q2McXWFAb0AXQfcHBTAAMr9A==","shasum":"c49960a9dce724d615b860713151cc83551e6089","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.5.tgz","fileCount":11,"unpackedSize":13575,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfDfeMeoevrPY/LjwRk0OG4dYIsMkvLs5Fg18lQxrdqAiAR153h8ZchDOv8EqVzhJFAqkYlcojtBwlo9dEFncEdNA=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.5_1700941539279_0.29202472441008487"},"_hasShrinkwrap":false},"1.4.6":{"name":"react-use-signals","version":"1.4.6","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.6","gitHead":"96ede5ca52d4118e40cfcd1f4b27e02a840cb747","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-MwRVRv6lqRjvX9Aqd/03vi4ez9Hti9czkUOqprL/5h6/6um+PMcoAchFum9V5khJEWgwNETkTWs450S1fLjERw==","shasum":"729118f3bed4fcac919dbb5318e3b31b54cba863","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.6.tgz","fileCount":11,"unpackedSize":13610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBDNEfO8lR9Cn6kSsc6hHW1bAYe8yuNnQLGf2LQITfcAiBXO3sKEGVtlHT9K0N/K6M1W+V4uCQqk7H4tO5INQjSAw=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.6_1700941689097_0.8018607412327468"},"_hasShrinkwrap":false},"1.4.7":{"name":"react-use-signals","version":"1.4.7","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.7","gitHead":"90f8ac42bfd8ea8587ebc4ca8ade7d103573ef92","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-mf2VXbIsOnx1+Y0Y1Q5Eo3Br5hD9cwf663VUnrVGieTgGjEKZRe9L2dN1wDsWz2qc2ZR+E6uZ17CqI5jXu6kCg==","shasum":"414eee33722312c49e9d55fdffa2301775b210b2","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.7.tgz","fileCount":11,"unpackedSize":13769,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYvBFAUdA7TS/Yaq8OH6jUYqzgZYY1b/9bLUC2EnrdEQIgZvhAr/1DcDFLtFzUeEwpCzPP0P/yHLWjmUYSTavJ+gw="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.7_1700943207720_0.9765425610920255"},"_hasShrinkwrap":false},"1.4.8":{"name":"react-use-signals","version":"1.4.8","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.8","gitHead":"a2efb3dd6b770c5cfac9b6287c8261d51dcd7596","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-QvfPbpk1aprTDHQDUwvPKZdsgdqv6SfOfStJJcrdPUen47+OFkMCz8m69ZGCDY/somQegjeZawrNZ/2j8A9aWw==","shasum":"694af28b577f08d11315ce08db254d295a51bd75","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.8.tgz","fileCount":11,"unpackedSize":13913,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGwc9cJFzKU+yoxQnlmX2MyezNF2TftOuiH4xbI6epoAiEAqxj/U/uPLyPbUsBF5eBR1nHbzk72GHgjaDJRWHeYLOY="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.8_1700944252027_0.9936563795928233"},"_hasShrinkwrap":false},"1.4.9":{"name":"react-use-signals","version":"1.4.9","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.4.9","gitHead":"a2efb3dd6b770c5cfac9b6287c8261d51dcd7596","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-VXzhR0t10ZZE4dr9SScmwqmy61O07rabiZku5qKDMJb1B7gumZU3eNJqBIr8uMLN7j29s4NIhmV+Ea+iyCEs8Q==","shasum":"96e22c7680c5f570afe0695a9d9931f39d3cc6aa","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.4.9.tgz","fileCount":11,"unpackedSize":13783,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtGbYugmsBuJMmF4nZ132ytNiHEKeDEiUUWBxH975PRAiAmPMs9VBrKSTP9XXNmV9rUVNDLdsY0iL7d4IdCeoLSKQ=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.4.9_1700944642583_0.2157404235988467"},"_hasShrinkwrap":false},"1.5.0":{"name":"react-use-signals","version":"1.5.0","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.5.0","gitHead":"b1d352b1e431b6264482fe718c65c093ef63531e","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-571L8DtLRxGBE5snL4LaKiLvmD+an5hwYghlmqKeQimY5r6N94r9gNqKwzb9+VOBc1J90lUjdQHsjzT5vGNzcw==","shasum":"1958b8734e414fe55e8bd97a6615f057ae325ae2","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.5.0.tgz","fileCount":11,"unpackedSize":13675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA93bNoBXTVTjA2/PrFg0CacUFQVB56SEzqD+kt1US2uAiAkJHX9SB2klkHlQQMs39OBTHeO19szcG0y0L5QJiwqJg=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.5.0_1700972423822_0.6735791127566233"},"_hasShrinkwrap":false},"1.5.1":{"name":"react-use-signals","version":"1.5.1","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"gitHead":"a233f55fa3d4e765e18502f8b52fefed143e00ca","_id":"react-use-signals@1.5.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-2hFBGjLByTyq3U2YHSPojf36rlEQjfI/+bJnUAx+ye5XqvPnHRGkvoKoke+b7l0an1OaKNHX7KpKzTUpvsLIkg==","shasum":"82dd222d0c0927b3fa53a37941734a19da76ae5e","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.5.1.tgz","fileCount":11,"unpackedSize":13405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZYLMtTB4R+Kf2p+Ub+T/smvfnJM29Y7CvtVEeoldM/AiEAlf08IYydUcq2UxVUVcgpqd6PFLdxQIE0MAP2li+dsls="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.5.1_1701034727458_0.7819814886574863"},"_hasShrinkwrap":false},"1.5.2":{"name":"react-use-signals","version":"1.5.2","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"gitHead":"dc660e26252a2dee8fd28bb148b81fb388b94fe4","_id":"react-use-signals@1.5.2","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-fs1sbQep61/PyDOE6WIVCQhPtwPIHObDCb8YmkjaLMC9UdT+KcDvs93dHfwlJQ21dRPZTEdXRWDdMa6aMI8hMg==","shasum":"efbf59415c65a86764f56e7a2783216f85d3dca2","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.5.2.tgz","fileCount":11,"unpackedSize":14275,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrWcUhQbeH3o8+qMrIcNMAyYtziUcqjxEoQTVLzjLnBAiAi6kWPLGWBHZdw6MKv6wseMAqQgxFq4+QT+nks5dUZFw=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.5.2_1701111236199_0.95084714059404"},"_hasShrinkwrap":false},"1.5.3":{"name":"react-use-signals","version":"1.5.3","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"gitHead":"fa2a417d1453ba2b95cf4472352de5bd0dd942e3","_id":"react-use-signals@1.5.3","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-D1q/nUIipxtarpnSgbxcgPi45LcJtDaYYHjl/NxzdilPQZT8YsplhZ5AAaSJGMuKR8Oo0oN4FtzqoFVeR5dfcg==","shasum":"8aa1130c42905ed907c0cd4376f9dd286a6fe6b7","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.5.3.tgz","fileCount":11,"unpackedSize":15228,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYpaVpgIUNBRPZyLGTKd3UiBKixpmmvQcFFT1BzwWgoAIgf1cuW2CKx2P+I8gFdjJi/TMrVJjjCJ2YYaZRMokG7u8="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.5.3_1701279010557_0.09349266527660682"},"_hasShrinkwrap":false},"1.5.5":{"name":"react-use-signals","version":"1.5.5","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.5.5","gitHead":"c45576a0430818b53a65a24af0b6c40e2bf7bc0e","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-9i7nGwPhOG/PtrN6aaLgs/9/uA4eqq5EMG4pvFkQMWK3uqQzX7s1m9bp2SgJep5j9v3riNGADQm3D50u9xzewA==","shasum":"d2aa7cc5cc2732f4ed6da08e65b219c7a49eb25f","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.5.5.tgz","fileCount":11,"unpackedSize":15162,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGH45/Ib01TbEvsQtjESegp0cSsl0/MAZZkwVtC4DkynAiEAg5hRLt1uGYCJ8R2bPZqMpSYxB+sqGyJIeO1sDpjWdPc="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.5.5_1701536027180_0.7642188561339807"},"_hasShrinkwrap":false},"1.7.0":{"name":"react-use-signals","version":"1.7.0","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.7.0","gitHead":"c0e29e3bdec521093faae82ebeadcdede131d1ca","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-ozqK3yVLIkpjcUOWMM0JsLBfEAf5fS2m2o5T2brZAoOKyOaSgRfYpE4kwvRYJjSdJODusMliZ3W8SF/8HwnzwA==","shasum":"ac518471219fb2f7bcb2677aef273758fe67aecf","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.7.0.tgz","fileCount":11,"unpackedSize":16841,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2afagbapRyiFHUsSOCd8/tU87ACWMIWd8AyAhPYYsHgIger55f6RS3xzee5I9LrgaWFa3upENZDO6zbDvG1DumN0="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.7.0_1701978557341_0.25772815481241995"},"_hasShrinkwrap":false},"1.7.1":{"name":"react-use-signals","version":"1.7.1","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.7.1","gitHead":"d05e2165329a5285eadf3f772af10b7c3bbecc48","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-Cx28wWBZa03OeeSD8luLPlaNvs9v6BnN8TUevieQqyfj1hWdQ2i2WDRjynH9OQJBvTUpPhI9KOs0TA252gWf8Q==","shasum":"7a8d457b334c6232dffe047d3542500a2d3b8e19","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.7.1.tgz","fileCount":11,"unpackedSize":16260,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZVPIJVzINOal5xo5yG6Db4xqmllceD+Fx/33ilJ27tgIhAP2BmUTFIXJsGRPcG3MUg/tAKmMP6/049BnfhsRPxIey"}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.7.1_1701979445086_0.8679598779245585"},"_hasShrinkwrap":false},"1.7.2":{"name":"react-use-signals","version":"1.7.2","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.7.2","gitHead":"b86af8c5eac0d6660bb5298f0dcfcf99d52a6adb","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-ML6EpbSubjnzRirdUL8SJ3w+gi+bUOYf9bW6ZWXiPEYm6v888WsfpS4ekRPxYCSjwbIExqmfjLhf1h3DsNd4Iw==","shasum":"db3af5ce56a909e3d963b6222b4288fd1bfe32e2","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.7.2.tgz","fileCount":11,"unpackedSize":18984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtCD2Zw424KDzKj8KzgL0HC4hmgUthuYE7QwBR940aEAiEA+4fVVcCw802sdzLVV9L8Mdh1ol2WnQz4cWXy3zX1AFw="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.7.2_1702742621038_0.5310482651049477"},"_hasShrinkwrap":false},"1.7.3":{"name":"react-use-signals","version":"1.7.3","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.7.3","gitHead":"85265612d076c64aee7616b8a4cccf6a489874d6","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-DuI5aVmnNtfCb5UhtmNRFimMp0sZBgZd4i3cVK/MvDhFly+k1I0LQIYEB2pfsduVcMbS3vVf58Pr4l+XCH9H+g==","shasum":"ae527f6af009790b578739faa83eed5b0746a8fa","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.7.3.tgz","fileCount":13,"unpackedSize":26975,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUp6CDszTzLPFQuEPrrVP3KwgsBUOqF7vVmTafahDolgIgG1LhIN7XyqUO/JR+/k7yXYs/mYiUFAz0VpBdooevzdM="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.7.3_1703249864973_0.2762341593718278"},"_hasShrinkwrap":false},"1.7.5":{"name":"react-use-signals","version":"1.7.5","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"_id":"react-use-signals@1.7.5","gitHead":"85265612d076c64aee7616b8a4cccf6a489874d6","_nodeVersion":"18.18.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-oDZl05C47Hx4M/T6N1z12jdOewrf3LLINSiIQDJV1iCPga1/lR8isFwfgPGILA2YbGPzfbkYP5M1gFWy1AVecg==","shasum":"f33ff49701bc269ce7f2f1e8251d85f4871c6189","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.7.5.tgz","fileCount":13,"unpackedSize":27147,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZ2sVWq8N1GzEfu29Vd7Y+kB5WXIL708qNdt19/XkKjAiB5TkkW5yGfDi1NEzxi1YY+ZtDcR9LXQ1YXbc5d1cu3GQ=="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.7.5_1703252034270_0.12119080185458242"},"_hasShrinkwrap":false},"1.7.7":{"name":"react-use-signals","version":"1.7.7","description":"A generic signals based state management package for React JS","scripts":{"prebuild":"rimraf lib","build":"tsc -p tsconfig.json","test":"jest --config jestconfig.json","prepublish":"npm test && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"keywords":["react","signals","state","managment","hook"],"main":"./lib/index.js","types":"./lib/index.d.ts","author":{"name":"David Kohen"},"license":"MIT","bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"jest":{"testEnvironment":"jsdom"},"homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","devDependencies":{"@testing-library/react":"^14.1.2","@types/jest":"^29.5.10","@types/react":"^18.2.38","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jsdom":"^22.1.0","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","typescript":"^5.3.2"},"dependencies":{"react":"^18.2.0"},"gitHead":"4c5914d4657bdd2db2ef2eb83005fb7cf2852611","_id":"react-use-signals@1.7.7","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-HoHMZU/pL7mu9OvNNKMK69oIcjY7KDr9km9hnlRytxdrtLqcg/PpDTZvKMqBh3tMoc2/sY6BmzP5iFTaCPplJQ==","shasum":"54d2523c2bc3b3c9500f130053145fde4ae415fc","tarball":"https://registry.npmjs.org/react-use-signals/-/react-use-signals-1.7.7.tgz","fileCount":15,"unpackedSize":29209,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdy7XlEYDbkElFXIA5i3vZbbzc2qLQtKDmCGm+9tgJKgIgEyTGn6fvZPe484EHVHC7cb77srrMEGXA1YsJUQy6pqg="}]},"_npmUser":{"name":"david_kohen","email":"info.learnnowfx@gmail.com"},"directories":{},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-use-signals_1.7.7_1704223101241_0.036259006338666966"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-23T20:42:23.300Z","1.0.0":"2023-11-23T20:42:23.515Z","modified":"2024-01-02T19:18:21.608Z","1.1.0":"2023-11-23T20:52:12.687Z","1.1.1":"2023-11-23T20:57:27.135Z","1.2.1":"2023-11-23T21:00:15.743Z","1.3.0":"2023-11-24T14:08:34.895Z","1.3.1":"2023-11-24T14:09:38.881Z","1.3.2":"2023-11-25T16:51:44.826Z","1.3.3":"2023-11-25T16:55:19.732Z","1.3.5":"2023-11-25T16:57:10.006Z","1.3.6":"2023-11-25T17:35:31.838Z","1.3.7":"2023-11-25T17:38:04.066Z","1.3.8":"2023-11-25T17:58:49.425Z","1.3.9":"2023-11-25T18:21:13.854Z","1.4.0":"2023-11-25T18:42:24.088Z","1.4.1":"2023-11-25T18:46:42.689Z","1.4.2":"2023-11-25T18:48:47.149Z","1.4.3":"2023-11-25T19:30:04.227Z","1.4.4":"2023-11-25T19:41:39.728Z","1.4.5":"2023-11-25T19:45:39.447Z","1.4.6":"2023-11-25T19:48:09.282Z","1.4.7":"2023-11-25T20:13:27.890Z","1.4.8":"2023-11-25T20:30:52.214Z","1.4.9":"2023-11-25T20:37:22.784Z","1.5.0":"2023-11-26T04:20:23.977Z","1.5.1":"2023-11-26T21:38:47.662Z","1.5.2":"2023-11-27T18:53:56.459Z","1.5.3":"2023-11-29T17:30:10.722Z","1.5.5":"2023-12-02T16:53:47.369Z","1.7.0":"2023-12-07T19:49:17.516Z","1.7.1":"2023-12-07T20:04:05.331Z","1.7.2":"2023-12-16T16:03:41.273Z","1.7.3":"2023-12-22T12:57:45.152Z","1.7.5":"2023-12-22T13:33:54.462Z","1.7.7":"2024-01-02T19:18:21.434Z"},"maintainers":[{"name":"david_kohen","email":"info.learnnowfx@gmail.com"}],"description":"A generic signals based state management package for React JS","homepage":"https://github.com/Personal-David-Kohen/React-Use-Signals#readme","keywords":["react","signals","state","managment","hook"],"repository":{"type":"git","url":"git+https://github.com/Personal-David-Kohen/React-Use-Signals.git"},"author":{"name":"David Kohen"},"bugs":{"url":"https://github.com/Personal-David-Kohen/React-Use-Signals/issues"},"license":"MIT","readme":"# React-Use-Signals\r\n\r\nThis package is aimed to provide a comfortable and easy to use state management solution for React.\r\n\r\nIt is inspired by Vue's Signals API and is based on their [Reactivity in Depth Article](https://vuejs.org/guide/extras/reactivity-in-depth.html).\r\n\r\n## Installation\r\n\r\nFor NPM users:\r\n\r\n```bash\r\nnpm install react-use-signals\r\n```\r\n\r\nFor Yarn users:\r\n\r\n```bash\r\nyarn add react-use-signals\r\n```\r\n\r\n## Creating a Signal\r\n\r\n```jsx\r\n// counterSignal.js\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const counterSignal = createSignal(0);\r\n\r\nexport const handleIncrement = () => {\r\n  counterSignal.value += 1;\r\n};\r\n```\r\n\r\n## Using a Signal\r\n\r\n```jsx\r\nimport { counterSignal, handleIncrement } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n## Reactivity\r\n\r\nAs you can see in the example above, the `Counter` component is subscribed to the `counterSignal` and will be re-rendered whenever the signal's value changes.\r\n\r\nThe example uses the `useStateAdapter` hook to create a local state for your component that is automatically updated whenever the signal's value changes.\r\n\r\nUtility functions like handleIncrement in the example above can be used to update the signal's value and called from anywhere in your application, even outside of React components.\r\n\r\nThis eliminates the need for prop drilling and setters and makes it easy to share state between components.\r\n\r\n## Complex Data Structures\r\n\r\nSignals can hold any type of data, including complex data structures like objects and arrays.\r\n\r\n```jsx\r\n// userSignal.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = name => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = street => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n```jsx\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './userSignal';\r\n\r\nconst User = () => {\r\n  const user = userSignal.useStateAdapter();\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.value.name}</p>\r\n      <p>Street: {user.value.address.street}</p>\r\n\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.name}\r\n        onChange={e => handleUpdateName(e.target.value)}\r\n      />\r\n      <input\r\n        type=\"text\"\r\n        value={user.value.address.street}\r\n        onChange={e => handleUpdateStreet(e.target.value)}\r\n      />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n## Effects\r\n\r\nThere are two ways to create effects with Signals.\r\n\r\n### 1. Using the `useEffect` hook\r\n\r\nSignals can be used with the `useEffect` hook just like any other React state.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconst Counter = () => {\r\n  const count = counterSignal.useStateAdapter();\r\n\r\n  useEffect(() => {\r\n    console.log(`Count: ${count.value}`);\r\n  }, [count.value]);\r\n\r\n  return (\r\n    <div>\r\n      <p>Count: {count.value}</p>\r\n      <button onClick={handleIncrement}>Increment</button>\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n### 2. Using the `signalEffect` function\r\n\r\nThe signalEffect function allows you to create a function that will be called whenever the signal's value changes.\r\nIt is similar to the `useEffect` hook, but is designed to be used outside of React components.\r\n\r\nFurthermore, it automatically knows which signals are used inside the function and doens't require a dependency array.\r\n\r\n```jsx\r\nimport { signalEffect } from 'react-use-signals';\r\nimport { counterSignal } from './counterSignal';\r\n\r\nsignalEffect(() => {\r\n  console.log(`Count: ${counterSignal.value}`);\r\n});\r\n```\r\n\r\n## Using Signals as a Store\r\n\r\nSignals can be used as a store by exporting the signal's value and utility functions from a separate file.\r\n\r\nIn order to optimize performance, you can use the `useSelector` hook to subscribe to only the values you need.\r\n\r\nThis will prevent your component from re-rendering when other properties of the signal's value change.\r\n\r\nPlease note that the `useSelector` should only be used if your signals is an object or array.\r\nIf your signal is a primitive value, you should use the `useStateAdapter` hook instead.\r\n\r\n```jsx\r\n// user.store.js\r\n\r\nimport { createSignal } from 'react-use-signals';\r\n\r\nexport const userSignal = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n  address: {\r\n    street: '123 Main St',\r\n    city: 'New York',\r\n    state: 'NY',\r\n    zip: '10001',\r\n  },\r\n});\r\n\r\nexport const handleUpdateName = name => {\r\n  userSignal.value.name = name;\r\n};\r\n\r\nexport const handleUpdateStreet = street => {\r\n  userSignal.value.address.street = street;\r\n};\r\n```\r\n\r\n```jsx\r\n// UserDetails.jsx\r\n\r\nimport { userSignal, handleUpdateName, handleUpdateStreet } from './user.store';\r\n\r\nconst User = () => {\r\n  const username = userSignal.useSelector(value => value.name);\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {username}</p>\r\n      // Updating the name will cause this component to re-render since with selected\r\n      the name property from the signal's value.\r\n      <input\r\n        type=\"text\"\r\n        value={username}\r\n        onChange={e => handleUpdateName(e.target.value)}\r\n      />\r\n      // Updating the street will not cause this component to re-render since we\r\n      did not select the street property from the signal's value.\r\n      <p>Street: {userSignal.value.address.street}</p>\r\n      <input\r\n        type=\"text\"\r\n        value={userSignal.value.address.street}\r\n        onChange={e => handleUpdateStreet(e.target.value)}\r\n      />\r\n    </div>\r\n  );\r\n};\r\n```\r\n\r\n## Reseting a signal\r\n\r\nSignals have a built-in method called reset that sets the value of the signal to the value it was initialied with.\r\nThis can come in handy when submitting a form and you want to reset all of the fields\r\n\r\n## Typescript\r\n\r\nSignals can be used with Typescript by providing a type argument to the `createSignal` function.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal = createSignal<User>({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\nIf no type argument is provided, the signal will infer the type from the initial value.\r\nThis can become problematic when the initial value is `null` or `undefined`, or an empty array or object.\r\n\r\nThe signal itself is a generic type that takes the type of the initial value as an argument.\r\n\r\n```jsx\r\nimport { createSignal, Signal } from 'react-use-signals';\r\n\r\ntype User = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\nexport const userSignal: Signal<User> = createSignal({\r\n  name: 'John Doe',\r\n  age: 42,\r\n});\r\n```\r\n\r\n## Deleting Object Properties\r\n\r\nAs of version 1.7.2, deleting object properties using the `delete` keyword is supported.\r\n\r\n```jsx\r\nimport { createSignal } from 'react-use-signals';\r\n\r\ntype IMember = {\r\n  name: string;\r\n  age: number;\r\n};\r\n\r\ntype State = Record<string, IMember>;\r\n\r\nexport const memberSignal = createSignal<State>({\r\n  '1': {\r\n    name: 'John Doe',\r\n    age: 42,\r\n  },\r\n  '2': {\r\n    name: 'Jane Doe',\r\n    age: 36,\r\n  },\r\n});\r\n\r\nconst handleDelete = (id: string) => {\r\n  if (memberSignal.value[id])\r\n    delete memberSignal.value[id];\r\n  }\r\n};\r\n```\r\n\r\n## Debugging\r\n\r\nIf you try to console.log a signal's value, you will notice that it is wrapped in a Proxy object.\r\nThis is because the signal's value is reactive and the Proxy is used to track changes to the value.\r\n\r\nIf you want to log the actual value, you can use the `peek` function.\r\n\r\n```jsx\r\nimport { counterSignal } from './counterSignal';\r\n\r\nconsole.log(counterSignal.peek());\r\n```\r\n\r\n## Behind the Scenes\r\n\r\nIf you are interested in how this package works, you can check out this article on Medium [The Quest for Signals in React](https://medium.com/@personal.david.kohen/the-quest-for-signals-in-react-usestate-on-steroids-71eb9fc87c14).\r\nWhere I explain how I came up with this solution and how it works under the hood.\r\n\r\n## Stay in touch\r\n\r\nIf you have any questions or suggestions, feel free to open an issue on [Github](https://github.com/Personal-David-Kohen/React-Use-Signals.git).\r\n","readmeFilename":"README.md"}