{"name":"@reach/component-component","version":"0.8.0","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"},"scripts":{"build":"yarn clean && node ./build-package","clean":"rm -rf ./dist","compile":"node ./build-package"},"dependencies":{"prop-types":"^15.7.2"},"devDependencies":{"@babel/cli":"^7.8.3","@babel/core":"^7.8.3","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-nullish-coalescing-operator":"^7.8.3","@babel/plugin-proposal-optional-chaining":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/preset-react":"^7.8.3"},"peerDependencies":{"react":"^16.4.0","react-dom":"^16.4.0"},"main":"dist/index.js","module":"dist/component-component.esm.js","gitHead":"7702c46373c7f11adc21184e7def9977203e9326","bugs":{"url":"https://github.com/reach/reach-ui/issues"},"homepage":"https://github.com/reach/reach-ui#readme","_id":"@reach/component-component@0.8.0","_nodeVersion":"13.7.0","_npmVersion":"lerna/3.20.2/node@v13.7.0+x64 (linux)","dist":{"integrity":"sha512-pgeTY70WkwlrwUwThXYo5EOnrA94cCYLhMUDhz7sE1X0b7qaMESHktk6TcJ2N90nGtQ1sBXr8SaTPB8UBIXg9A==","shasum":"013eef0d7c2d744e90230938cba5493f8e05c76b","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.8.0.tgz","fileCount":5,"unpackedSize":14602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeM14uCRA9TVsSAnZWagAAvtAQAKJam4oBLeXKO4YobdK3\nrXPOJSik0KvFcDCF8IBCez4Gt82Enomm2shIKZvINVKyMhIERGQUU1hhDsFi\nDHGAEBguOfrNkng917kY8o7d6SBP7+OMwVO6fycE5MBddb8D3Gqno1pwGHTX\njoE1LZHWoEcb5/wOCe6ZE57Z1RS845xtf9oumwWO9geE7JyTHruuEyMtC61G\nUPhH0GmvcMlUikKT7MpMnuwEg5jZsbecLAb0eEA5jdPMNM55mZkoF0ptdNyt\n5gwWvb4I7LxrNGEZufd0wW4c7RZ/r0oqRSZ9nSOPryz/DG210vShk1FrRfkf\n8yVeTrL7SPgxVDMto6ZrzBlc1kTmpFsAXXdzoft23gFRaqi3SCnEokUSzAtO\n5zllNEJzts2z2x1q/0ETJ74618DZat7t0KSGZ3XW0VMWfoYYJaiHCMNgRnmg\nZUifvIexA826aBWYY2ms84UTGxGiAwAi2YHXxVyWrbQV/0fwsK1h8ZjVPEh6\nywVWaU3P25R8cZFK0nqFpH8Yl56F80wq9IVIwm27PttVfMTBBYS08pILhtfv\n9w80JDIc0E93kkK7n23NbZFTCon9Bp1F1PPfWpoFrR+PstrqIXGE22WmAg19\nLtBemkBsVTx+i5Rw3NI26gKy50S2QCpScAX9weqTzl5TwtMDsJSn1xiMZ/u7\nC7zx\r\n=NOw8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAYQeZGeLUsGznkj4htNE4CnlnKKnMQsN8+aobuFrhB9AiBHqIYneAtCOhOGmOsli7HRIN0bUIthS6uobF8nZL8lxw=="}],"size":3767,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.8.0.tgz"},"maintainers":[{"email":"chance.strickland@gmail.com","name":"chancestrickland"},{"email":"npm@mjackson.me","name":"mjackson"},{"email":"rpflorence@gmail.com","name":"ryanflorence"}],"_npmUser":{"name":"mjackson","email":"npm@mjackson.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.8.0_1580424750416_0.8371519265452416"},"_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":1580424750557,"_cnpm_publish_time":1580424750557,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}