{"name":"@reach/component-component","version":"0.15.3","description":"Declarative React Component Definitions","author":{"name":"React Training","email":"hello@reacttraining.com"},"license":"MIT","sideEffects":["*.css"],"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.2","react-dom":"^17.0.2"},"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":"aac3d3e1902ec32656476bcdccd7b56207384fcd","bugs":{"url":"https://github.com/reach/reach-ui/issues"},"homepage":"https://github.com/reach/reach-ui#readme","_id":"@reach/component-component@0.15.3","_nodeVersion":"14.17.0","_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (darwin)","dist":{"integrity":"sha512-H3FpPrJDBk7GOtcAHMiwfVukmx5SUfSD9eI/gZ+cjjIf49+UcAXY9mIX3ypSrmgCeVtirFUk2B167OkmTSeh2w==","shasum":"b427180031f1aecc88808bef27da22219e9ec3ee","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.15.3.tgz","fileCount":9,"unpackedSize":20089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6gRPCRA9TVsSAnZWagAA3JgP/3tXjEaTCalQ1iq5YmPo\nAvFZsEiOJR95PgKAxUSP6GXxQjlrtdhqzBhr6XeldfZD6ZVUwPqIBCGyRvIH\nwwgzIlAAckSduAAHSxQd3AWY5UuRT+fMifBfpvsCedLFvUmzLWwLDGZRHOVL\n224Qt+RjL5un9q2d+k74rcCLubUdedAALZBi+c/EiyZozc+nLK6rbh3pZtv9\nnSp3V8RqApBsh1GEQTOBqwLjee5v220YyK65X5JYQsTB5cHCInVWiYOsjQNZ\nMkAGxk5QW8y0lBMSoQAQfhZ6fv6om+EqYt10MI7TCusQU2crnC7tzLKaV5Dq\nk5fdN0s6zBRsEsaa4DJVoYwYrhT/oFdl59s7iz649O/Aezb/IvYmjVkdrYNH\ny7sQiXJ8q32G/TgesvzqOb2KBeI+SAIhTTIuSnq+TwTSmC/Tzry0DulDVJu6\nlaTpHBbyKMMgTXvrlrjgbSSt2iDD0t7pnSaEJgEwyYbVNaC1Lyr7j1OSPqIw\n0NLwLk3vprAMGZTv9GZGjin9MJKDgNBZW1y9zXOyb6Z+UMV0Kn0AG40tnOqh\njb9OdAxy2fX/ttanEjOVHuSMNViXzit+JfscX2k9/JqyKjw4pC1NuM10PRbu\nfi7T2HhDz4QjUPfdwswJ0HDbwEBOxh28Binweyo4z+ojIydCvghLOTstEDbQ\nBpqa\r\n=3BLt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFUD/i8FM2j3Plt58JqxY5O6Y6m9Qs1ae0o6qswebtcQIhAKa9dl+h3uVxf1EL5l/8U9YZyprRkHhSqTTEROqI0b8A"}],"size":4232,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.15.3.tgz"},"_npmUser":{"name":"chancestrickland","email":"chance.strickland@gmail.com"},"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.15.3_1625949263004_0.0946085091292237"},"_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":1625949263138,"_cnpm_publish_time":1625949263138,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}