{"name":"@reach/component-component","version":"0.1.2","description":"Declarative React Component Definitions","main":"index.js","module":"es/index.js","scripts":{"test":"jest","build":"node ../../shared/build-package","lint":"eslint . --max-warnings=0"},"author":{"name":"Ryan Florence","email":"@ryanflorence"},"license":"MIT","peerDependencies":{"prop-types":"^15.6.2","react":"^16.4.0","react-dom":"^16.4.0"},"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.1.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"dist":{"integrity":"sha512-LSsLxBA13qLsfjLtytiuB0siVJSTp0h3hhlJybr90Ynx1SuQ4pRtMi5aUIk7HM3wDswj22YbGC2zOpzibNyN3w==","shasum":"f3c2a53de56d54c8f0ee398485d5831d66e3cc34","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.1.2.tgz","fileCount":7,"unpackedSize":26767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUN0sCRA9TVsSAnZWagAAA10P/A3QGSWAmB+lLTWrvjoC\nzuQSlOJ+7hn3Xj5RK7vxNpTcxJLnEwGiKEY3Wh9a22wNn+R/EO6wx1XQsOGV\nwrI4AsVBrQBmB92gVmMpHev8UxqEdw0dHRg04QtR4hL+9LwTvbjC03pQNziF\n2NgokXCZOpJb2nxUaTg7ORWk0LSmyKF+0nPDqDcYNjspmNg9Cv/WUvOvSWG4\nwmEMoXNS1sRtkPgNmijpH5oBGXd0aOfdi9IDSr5G/oW50z0jU1YSSwYl7pps\nldydpw8VaBBlQbKK+MskSiQZmU4gk2Sf+lxFAhe0g5bY+MUzrI8RbX5OqSRV\nER4hNwpjcEgZjWQvddYJO7wPfn+pQBd6Di+WA5/YkS8ZZp2t1YTULkW6kSWR\n+n/rt7+vFXztGNeL/1B7jsSUgNqrwqy7iMHVvf58ycs8nta42pzbIYslZKUg\nt55vomLxgrX7uvVvU+5Lu7hL0U3eOhiR+xk2b/Ku9ENOBi+376LWI2LIHsnI\nS9+xXDgNjHP7wRHug2MBfSXpKOSB3UEWsakxHGMvt/q1UiZI0SJq3TA3kKwX\nBvCqwjCi8XOZw5JBOGWqUND9aengRueaKY0PoCUuuc4qevxLwyJRG9rupER5\nmemrl3dRT1nj3Wq0uMlZ7C12I3JMICo+LJzisF35ix4lqJCWLQqFBiMo54Gd\n9mxI\r\n=qlfu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDANlRHwY5tbpPTcgstg5e1gmyeNeogwuXhYbp5ESjnYAiEAkPEpaeYpSGS7WdGl6R6sLeOT8e6R6Z6jxK7fnWOQp4c="}],"size":5101,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.1.2.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.1.2_1548803372470_0.1466287956174932"},"_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":1548803372554,"_cnpm_publish_time":1548803372554,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}