{"name":"@reach/component-component","version":"0.0.0","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.0","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"dist":{"integrity":"sha512-ghKGcX8ln8nagXhfblQYjAo8i+QR15Lpf9rPpIHveakuXFJvb8J8LbKpgfDGFc3SfvN4I9i4tKwV0wh9yZps4g==","shasum":"f4cfd4dae87a53869610beff4424ba62ddf3dad2","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.0.0.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\nwsFcBAEBCAAQBQJbYJIXCRA9TVsSAnZWagAAjIAP/iwq4ATkJZsHNGEn1hUo\nvQwXLeJ0agLAX4EOpj2eKPBS6cxU9kiesM+bIeyvwWafpe1EAvrAgN091stZ\nFklvcVIteAmUpusWptn2h33lUMYtEgCfzuOqYRvPvdElthZX3cNuIDmm5aUF\nz2MQYLMH4JEPeOr1qlO/e1UHxm/FtRZf1AmldrBJpfnE3smYcOq50XUPudMB\ncXhZ0KBGyy6WQcXcXltd77mZkuIBLNCU/6x5ZzcsKlCzm77imMHAlYpl0JtJ\nsHSxLXFbGYBch0qjrMInH7MU6KUDwiVCPjsIgiKxkExfap5CHY14yCjyOSow\nx7nyIDp7czeStOzgvbj4T2GZ3XAzthB8T3PkI76eV8N8oGW6CRTl9oF9ClS7\nE9E9QlJw6F487qnHz0yTSI8lTaUCw53fV5qNO1xXGow3plvw1o1HUktShOMQ\nIg01hnEC2JPZbV90gbLvF5rYlULg3bs09cT5dZrcJEIWfRQ4ISqpLiuqR5EW\nFft4ISVEq3DZX021u4HtHcutmAMvwFJXHZxNRFbAv33wVMiqvcJ6qogvOBVG\nrOxFRrHM88MGsSRiqOFJjCdhuOaVhFI7MRpLy7Lsxx9UroNTnYS1ZxttjdeN\nmD0a2PcTFUmTN9GWdwmTbh0yCcjP5VDgaKvK72r9gO4APPiw7NebF60xCiuS\nCbzD\r\n=bEY2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYShbs69KahqvTg2eJgpI3qe3qvb5wTh6qcZ959Fk2UgIhAK0UbKAKEADux3HN6Dd8MTppibr4QEbu72c/v1T8Y16w"}],"size":37068,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.0.0.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.0.0_1533055511622_0.22887814434099307"},"_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":1533055511747,"_cnpm_publish_time":1533055511747,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}