{"name":"@reach/component-component","version":"0.13.1","description":"Declarative React Component Definitions","author":{"name":"React Training","email":"hello@reacttraining.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/reach/reach-ui.git","directory":"packages/component-component"},"dependencies":{"prop-types":"^15.7.2"},"devDependencies":{"react":"^17.0.1","react-dom":"^17.0.1"},"peerDependencies":{"react":"^16.4.0 || 17.x","react-dom":"^16.4.0 || 17.x"},"main":"dist/reach-component-component.cjs.js","module":"dist/reach-component-component.esm.js","eslintIgnore":["node_modules","dist"],"gitHead":"24995121ef36d6d1768bb3bdef6e3353d905a167","bugs":{"url":"https://github.com/reach/reach-ui/issues"},"homepage":"https://github.com/reach/reach-ui#readme","_id":"@reach/component-component@0.13.1","_nodeVersion":"15.9.0","_npmVersion":"lerna/3.22.1/node@v15.9.0+x64 (linux)","dist":{"integrity":"sha512-LCmCkNdBirIpUQKmA4AMJmIY03pqIcEEbmuK04F0+ZEqWmODm5ErM5F1XRwUio9lfZbofn9SbHS/Q9HQsvfVwA==","shasum":"bfd15e65a53cc1cc25f9cf40fa8547395f54d795","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.13.1.tgz","fileCount":7,"unpackedSize":17490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMq56CRA9TVsSAnZWagAA2YUP/jZ3q6eKvVeIt4e6tegH\nYnohg3qE0u/T+opeH6MYsL0mRWAaHxlEQpLVSkb/NnjjLhfOwBlRBbY9YXx2\nS1kmNcs+PhkYRFLUQlAiQ57ngOjjfwipivUAhS+eyAjotlRQEmOloKgv/C3S\nKCNn4ZBfYoisVssBb9/3mI5QS2uCg2OgTBSG+X68dyJPP1rjCU/lwW4ucIe1\nVJGfHecPp3RIr+sgbAdfdeBAM8lpldvyyxviP8fXERDzlBqHb2+FtJYDOJ7P\n1VjklFbrgdQScQUxXb8SOvnJJceEylrZ9SbAvoS94bTgrJ3wR9fWQOhx2i73\nneqlw95ZTieI84GqboCrYbmDBz0U2b070YUuD00+Y11tj0Nx+IE8roJZ/UR1\nojf1CQXswOYGj3FneEL7bAUxE6c/cL2Vgl+3jlhWkHvQ2F5WpllOgRsPwI8f\nXn53jNVijKT6mMYcU24Gnq1+YYilcHeTXhYg0c3QIWR8azMiaPeioEjNZdkl\nN0coYLAAli7iqELyNyZkmYD/o3TEZIxcZ4WD4Moyr4T32le1074m6bRE7R1A\n2+80fJaiwSmyQEE6WHHztxYHshe9YtpUF/NxwCDjKGYDxmLANNfVChk6nRU7\nCFZD1VT47CC+MONnxXB9eVUMKROdcxPWIasRxPx5XRHox0zzU3Cwxu83bANQ\n2Tov\r\n=ZQbt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5uKgT5gtE2pksP9pej2Z8mKDJ4zWl2O6qi6rT8z24lQIhAPceRxPcE3pZQ4QA0r+Vs+mtLU7yi18r0X79NmTsKGoU"}],"size":3622,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.13.1.tgz"},"_npmUser":{"name":"mjackson","email":"npm@mjackson.me"},"directories":{},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"},{"name":"mjackson","email":"npm@mjackson.me"},{"name":"chancestrickland","email":"chance.strickland@gmail.com"},{"name":"blainekasten","email":"blainekasten@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.13.1_1613934201950_0.1265175528471727"},"_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":1613934202059,"_cnpm_publish_time":1613934202059,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}