{"name":"@reach/component-component","version":"0.9.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":"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":"0c789bb48554bf13c62dd09210ebdf2f9af33d30","bugs":{"url":"https://github.com/reach/reach-ui/issues"},"homepage":"https://github.com/reach/reach-ui#readme","_id":"@reach/component-component@0.9.0","_nodeVersion":"13.11.0","_npmVersion":"lerna/3.20.2/node@v13.11.0+x64 (linux)","dist":{"integrity":"sha512-0QUC/jo6CeJBpWdx+CyVJcKMPdwE4NKQmVvEi7mWkOHrFjl+mTFzz//86nUx/nfUPv5I8Px20VVFD4yWRqnUWw==","shasum":"3b91a732f11048784589d29a8f6e4af4c0a18e5c","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.9.0.tgz","fileCount":5,"unpackedSize":14517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebCcWCRA9TVsSAnZWagAA5b4P/AlnXnUdiaotNdpxJ1aC\nBGzLa2YV5RVYx6aiD9/Nfuj2Y4tjIYTqfBTN4jvbQOG5LsermkPxtYVJqEzR\nvh1BmYWhETlH57alNuWm8o8L+SAydj3lA0ANORnZTdUJ3VB8zllUWQbGtVCv\niYSikenNuc6ub8GEZb1CKCJg0XAlI81LbQc0aTtFQF6aLhdhodbM9WGUNuSH\nd4SvygmuLiLz4WDFGQGbTPdqSdeQs+Q4ex3n3qCqpyoTs4zxAyeaTmzfKMQO\n1QuZcjeTijLXe1s0GZfqdMr15PfNCYWMYyMngGBA0wOFHn6vwtFY/fETiq/s\nArWZNNXviNg67Cn8OUvT54aj6CAUBpHCKhehzATCslRY5j1sPx5K3AM9y/7X\neGAuABjL7IspAoTDykHn5C9xLFuh+xhixHIesiKXV/knwINIthNU5eNkhE1s\nJShZb5GuUGVzrzH2IyZWiTTlPPI/NjuOrsANbcAInFnVCHacJ+LD3RJpTG2j\nfcUwvcDYPckLF3QJlRkm0tLt3rK5fzmX/YMz3Nz+9aovhiBoKLW1uWU/Aus4\nUeRVnvHcQw++14Z9GSjcJ0iRp/eCTu/VTa/RzRz/5kuPLZH0UOfAyu/MgIHt\nYU0mAMXIqsw3ubN2RQehrT6MR97iZ6PZrH6wd4sf782RJ9eMaU3dUiN3+HPH\nV1P1\r\n=uTGf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6dc6xd4uczdspFDQcqiAF+yq5RzzeV38/xfrAtVzscwIhAMky4X9+8oJ0pVTFpwq69vL29Pxt0nd9STF/0OSEwnYQ"}],"size":3735,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.9.0.tgz"},"maintainers":[{"email":"blainekasten@gmail.com","name":"blainekasten"},{"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.9.0_1584146198351_0.46302943822069276"},"_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":1584146198481,"_cnpm_publish_time":1584146198481,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}