{"name":"@reach/component-component","version":"0.0.1","description":"Declarative React Component Definitions","main":"index.js","scripts":{"test":"jest","build":"node ../../shared/build-package"},"author":{"name":"Ryan Florence","email":"@ryanflorence"},"license":"MIT","peerDependencies":{"react":"15.x || 16.x","react-dom":"15.x || 16.x"},"devDependencies":{"jest":"^23.4.2","react":"^16.4.1","react-test-renderer":"^16.4.1"},"jest":{"testRegex":".+\\.test\\.js$","testURL":"http://localhost"},"_id":"@reach/component-component@0.0.1","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"dist":{"integrity":"sha512-630jRr6EkpPMUGoI3+m3BPlU2MC17/34jL1u2fHVwRmbu42MuHcJn9/NnvYwvnNrfdvWxl6KfbVI7iTt78XwDg==","shasum":"a69595146c72982dc0760981716b002231e160c7","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.0.1.tgz","fileCount":10,"unpackedSize":130318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYJJ1CRA9TVsSAnZWagAAIxoP/2xg4GvBVXJUAtfM2NN1\nhVh4rtwwS/alPO4O+MH1qRA9l1mjENClfCH7cmfWoczJGJX1L2+dCNBLPScQ\n+Y2/zD01DySJViO/3PGowmJNKrd9CSoYsJ4vj+snR9uDoDVFhiNhryYeH6bp\nauksmqkZdaTy6814vyC65dGBSqQYL+Yy1tA94vWS2P5/H6QBKpQU/kWRXgVs\njuaMjRQET9R92Y0H5i8UeXrl+4rbONa3Q8D8tY2OS9MA6/gYdOQwU99YH7m1\nCz+pGaNUMeP93TpWQ+13XYzd6kBIsDk02LHbKryjgPOsuvdsRDRkfGjLj5z7\nO7N3x0ZDGC6kQ/PeQojDxEV8yBU6azHjYtsyhxkCEku1VESwBltA8JdkFgJo\n5M6v2rO8ZJIR7s9+hFUV4s5+yFqNJOv9NtRg1U1923wkZ2Vn5nfXweF3EtmE\nUBiGEUgsSdKN6U5C1rfpsN4S+uf93sUaKnRLxIRhvxEtLKpJCQZCjOgIWDMB\ndIbqDFv4v21YKtfu+i87RVM01GjWmELDjnpO/fw4nvEuRe64a2/1gi8O8sar\nJ7m+M1fZW8n+S8do9U1SndYas04WDRUsiHKb0iIbc4X5NXngrDmrXoeSr4Ej\np3KlAV6Z0dNsOFAR7SOSnwSTr/NZWsWK9ooQhQwIHaZaed7PgesT77U/3QRC\nWqMk\r\n=qkNX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG1FmQC8Pp3so29hHBAApwhN/jncXT02Hc8gDA2YklqTAiAg8IcjmxDP2CAwNip0YM4yArX1xeHxsliBN0+KtR1OMQ=="}],"size":37070,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.0.1.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.0.1_1533055605594_0.6903674926851708"},"_hasShrinkwrap":false,"readme":"# @reach/component-component\n\n[![Stable release](https://img.shields.io/npm/v/@reach/component-component.svg)](https://npm.im/@reach/component-component) ![MIT license](https://badgen.now.sh/badge/license/MIT)\n\n[Docs](https://reach.tech/component-component) | [Source](https://github.com/reach/reach-ui/tree/main/packages/component-component)\n\n> NOTE: This component was developed in the days before React Hooks.\n> In most cases, you should probably build your function components using hooks and use a class\n> component in the rare cases you need them. We may deprecate this component in the future.\n\nA dynamic, functional version of `React.Component`, a component component if you will. Useful for inline lifecycles and state.\n\n```jsx\n<Component initialState={{ hue: 0 }}>\n  {({ setState, state }) => (\n    <div style={{ textAlign: \"center\" }}>\n      <button onClick={() => setState({ hue: Math.random() * 360 })}>\n        Generate Triad Colorscheme\n      </button>\n      <br />\n      {[1, 2, 3].map((n) => (\n        <div\n          key={n}\n          style={{\n            display: \"inline-block\",\n            margin: 10,\n            width: \"2em\",\n            height: \"2em\",\n            borderRadius: \"50%\",\n            background: `hsl(${state.hue + n * 120}, 50%, 50%)`,\n            transition: \"background-color 200ms ease\",\n          }}\n        />\n      ))}\n    </div>\n  )}\n</Component>\n```\n","publish_time":1533055605710,"_cnpm_publish_time":1533055605710,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}