{"name":"@reach/component-component","version":"0.0.2","description":"Declarative React Component Definitions","main":"index.js","scripts":{"test":"jest","build":"node ../../shared/build-package"},"author":{"name":"Ryan Florence","email":"@ryanflorence"},"license":"MIT","peerDependencies":{"react":"15.x || 16.x","react-dom":"15.x || 16.x"},"devDependencies":{"jest":"^23.4.2","react":"^16.4.1","react-test-renderer":"^16.4.1"},"jest":{"testRegex":".+\\.test\\.js$","testURL":"http://localhost"},"files":["es","src","lib","index.js","styles.css"],"_id":"@reach/component-component@0.0.2","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"dist":{"integrity":"sha512-28F24YGvBPD7c5aagN/HoifuCBCOX+mCDfKqAs3dYshcPDctOo4B0XliRIQQFmmkbhAdxAlTim3VDaFqob+ibw==","shasum":"4c4ffef9c00d22034d44cb01f5727106ebf34f4d","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.0.2.tgz","fileCount":6,"unpackedSize":14681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYJQACRA9TVsSAnZWagAAIIQP/i5pQxusroxxmZks13Hc\ngRMVfVodhJno6PUjRcg6kw2kpXdw4AsyukST+XuHMU7toYohoSys/Z76EBtr\nyu00zkbANjjoJ9AJW9uoxXV/0qUtvviSsnJaZoEctjM0ezo//VKonjs/iI+T\nWYgmyBbjc3nD/Q79xwp3HyDejok2tRPe4s6GCt9302XF+rs2Md6nhBpkxlR8\n1RgW6bk2OlcbxozXPtVkHPYRnuf1jm6pjH+fB1MA9fr1MJz6eyZKtm84kRPE\n2PRp79/fM2c+H/71bqjD1l+BPcnvEmCVowbtfONV/gg7zoD20vt+SpA933Me\n7+VM6QLJ092Mb5XZi+DxLx6vsmjAhESz3yWvOp7SN1nLe9WGELJpujgIcNGe\nEw6HMLOVZ6MWLUHIu58iqPwdKeb6zhCUwDnhMutZ5wXiGWZa6jutGzqrSuT0\ne+gv8NmOlFlHRgk/foiRMBOHgbv3BS51DgenQZbBMG4wqm2D9Ey9kICwC6pr\nKAioL0hTvk1RnqDLZvXFR3FdBuIW1cn4Vk4P1cDHeb2XaeMto6Nsi/j1KQvd\nhd1NzFg5VvHiEtTxRUYATRbkgEIojDbzpTaXh8drHpctq3aq27XxIN1HWyZZ\nwLiNTkRncHfPbt8odClUmSva0UofK6qDGVe/qS9Hw9gGHs57G2YydY7XDipN\n4ALX\r\n=uJ8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCibha43lD0P0GT2vzweKeEwJ1N7bwS6CdElk4IXSl0iQIhAJO/oVTYKosbV6Sy9vGghxzBmkiy5WtAoWOKa7DEKuT/"}],"size":2951,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.0.2.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.0.2_1533056000151_0.7279943449864665"},"_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":1533056000319,"_cnpm_publish_time":1533056000319,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}