{"name":"@reach/component-component","version":"0.1.3","description":"Declarative React Component Definitions","main":"index.js","module":"es/index.js","scripts":{"test":"jest","build":"node ../../shared/build-package","lint":"eslint . --max-warnings=0"},"author":{"name":"Ryan Florence","email":"@ryanflorence"},"license":"MIT","peerDependencies":{"prop-types":"^15.6.2","react":"^16.4.0","react-dom":"^16.4.0"},"devDependencies":{"jest":"^23.4.2","react":"^16.4.1","react-test-renderer":"^16.4.1"},"jest":{"testRegex":".+\\.test\\.js$","testURL":"http://localhost"},"_id":"@reach/component-component@0.1.3","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-a1USH7L3bEfDdPN4iNZGvMEFuBfkdG+QNybeyDv8RloVFgZYRoM+KGXyy2KOfEnTUM8QWDRSROwaL3+ts5Angg==","shasum":"5d156319572dc38995b246f81878bc2577c517e5","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.1.3.tgz","fileCount":7,"unpackedSize":26767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjyKUCRA9TVsSAnZWagAAx4kP/2QwBRPP0cZP23aEQv8/\nq3Qs5+5rPujD1/x7ytYzPzQ0qAu4fhF9C6WMx/f73TsZ7Fy/Eu48CHaSfqBz\nhM1DCvvPhzA9rrW8wcJmsgEiE6+Z3KUQMTkIoOu8RB7eaojld29HtwuXNEon\n21WV4a3SRX1cY5IjqfzBpNJnbqZzZuJ+ZRqcMfvYkhTbPKL75f5KqdYBx8L0\nfTKStTSLkB8B/4psH8XrLz4s3109xxykTj5jUwnsL5k6wtIIQyPhUDG1mQnV\ncbB6gkNe/2p5SV4YlPLqQDxkFRBkbOrZIwKbe3DI1KttUtF4+lvimRBX5ksI\n3DBu8hNf8PjNkCFNvkUkQHNBSVDt4q4aZnyo3Tk9RqrYdQqcrjMIgGUvqgXZ\nV/XKfu4cBsaIiEkz+Gl/FUhS7KVZhtS2HDMAjHrV/GCCXm53QId6sc3Mx6HR\naTW1e27FipsyorhS1GM+rwqZoDXK4xBLwxSdpaLWwTVuNJm1kaLfwfnCeCEg\no/47/+hh+W/RyDdDRrXHDx+vArT6gHgDhK9tDtgfEDbWdxsII7WaCiSBnVkY\nyut0+BEoSN8DTj8cWE59KSMzC/81rku05R+3aTW9Ul63lsHAZHhFU3y0x1WH\nr2tgbS3BVczugfe4LSsr3nvIt22hPD8UswpzHF8MV9dSacTvBaVpndAGOSSl\nQkPw\r\n=W15w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHL+ZQgSrew529sfaNpyYAL0mdDt4rRvYpPACY+YP6NvAiEAyNPlJkfcNjpFKKVGvqr3q6JZNj8SpgfubizzrkQP9PU="}],"size":5058,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.1.3.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.1.3_1552884371703_0.886970598090381"},"_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":1552884371857,"_cnpm_publish_time":1552884371857,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}