{"name":"@reach/component-component","version":"0.1.1","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":{"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.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"dist":{"integrity":"sha512-4HxyyOLo/nDg0LlgYvzgqpTGaxqKmrZB8/y5wWhtyvGzgKAb1DJzSnYRaFsgGGgkQAQmhwPXKZ0H/rOAkxXJ8Q==","shasum":"62ea2ec290da32f5e3a9872fb51f9a3ae4370cc4","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.1.1.tgz","fileCount":7,"unpackedSize":15986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjcXyCRA9TVsSAnZWagAAfr4P/isDMzF+DqO+NHi7a8J2\nFVy9RaCySCRqY+V7lFMlVogOQ3GKxIJsbqe54LGuux0vArWzhY9qEDt9hwuz\n6QRVQW4zCKbMCWJxPy5SvrHP+442WQEJrxBvlkedWu+LTMovuwoE3p3J0ORp\na6ZY+fZeBgfgmLCk6OghJn0drumCypIaMQrV8bXDbybpFSVyN+T1C0tTj9zG\nFH8trRPIwZO0XmzjjQGI7//EZqg+TvGGMnUw9EUp+flEabk0C6zrJstHlAiZ\nIDbV8rhcJ2s4K8ABu28D8x1++O/O/BdHMWNT2if7zq+u1JRxhsubKtVNRjdC\nkoo1CQOQbc0egC+mMx8AFfR4LZ6tAk/LIGDhp4DT0Yzv90KyZGidnG9Dwh3u\nhIiny0qhCeQGJipynDYkQOg/Nj5lfQCdauL/ZK6lEtFkrjVDqfuPmPIwUnAD\nCGkXoty5sNun1/TN55cR+KatKg/yB4y8V2sPyTpas25cMsKAWra/ZQOvrilX\nfAIWvJ1u3rp06aG6tRANXZ2/7wjCasl6S0lJsxodi5UpoZtXOHHpBSHWmqtI\n9TjMETszRxJPPDnrcu5726xVEnFTk77AD9e9h2Hya7MNCJNGvMbZtwDHTIkt\nS2oCnkQaAHC+2zNpYiHu95pIfv4pg2OM1o0DouBAQZOK1jIg8EM29v1xucXX\ncYzS\r\n=oN9G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDj7X7s4tGLybL0tTu72/J5+7L8/CyvvGEbi479EkslrAiAHNCOMkUEVgJzj1LYe365Ke5pp0Ujz5779/FhA8W3Y4w=="}],"size":3285,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.1.1.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.1.1_1536017905336_0.7241949298947536"},"_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":1536017905513,"_cnpm_publish_time":1536017905513,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}