{"name":"@reach/component-component","version":"0.1.0","description":"Declarative React Component Definitions","main":"index.js","module":"es/index.js","scripts":{"test":"jest","build":"node ../../shared/build-package"},"author":{"name":"Ryan Florence","email":"@ryanflorence"},"license":"MIT","peerDependencies":{"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"},"files":["es","src","lib","index.js","styles.css"],"_id":"@reach/component-component@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"ryanflorence","email":"rpflorence@gmail.com"},"dist":{"integrity":"sha512-oAUxbp4ARbRRGVNJt/sbTC7odC55XhM1pyblN8V4fVZuOu3yagVRCv1kgBTwMkUGw6rBtqBm6UqOJOstuPoghA==","shasum":"ea8fe4ad2a219e71feb0fb065b82a5683286d7a4","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.1.0.tgz","fileCount":7,"unpackedSize":15979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhJykCRA9TVsSAnZWagAAO8gP/jI50a+yMIALPwHlOr99\nCchX12ZWs8P1nMrTItzLxyl06npkfg76JK9T0RgckLH6DsGGA067OEFnMQVE\nHT8LxFUVFh8XE0hAp5XHNNKHgdos4knx6jWIR5k6Loz7SjNq4XFw30Gq1Uns\nCmKBS5U+VzReUm5GVTYBpmFhilIyUV+g1tDbi0blr9i++I1aFJ9wbPZ21l1M\nreRHDhfln00lTrgJLKgYdTsNzgBsWCFk9qBgB7FaDarGrH8X7ztIXOSMTXXl\nXSIvgzvWQh9Lcpi5IFCJMz2VQfZGENfmHTKEA2i3oTD1nsPFcQdNLP2qtlZO\nVwFM+9vxP229+UWFDLrRMtDddDQ5Ti0j0pJCtyraZjOxQyhewsguL3PaEoZE\nrnV1vqXGjfBYSEDSoFhpdq+cRIsEs0FhhWPtkKylndZBXh/myarNwuGXMoqY\nUKTar574AJLhFB0yj9Rk4Ri12e1UL2qvji4RdERJ/Ylv25OOlG3cUQ0vCyw2\ne8u3Ray0pdOUvu392efRQO4wuEKJlT6jZjtaDI+tf+PePrE/11QmgJhWOuvV\nV1190FqA1r58/dC9tWxGDejV5RFX84ZOhoLQVRkYeeER7L6G2mDyA3UOUAFp\nJqMSIKAowQ9M98VLBl+ykywEivHqWiwf44Pd5OCFhb49nzbWr51ur2d5dtIJ\nRRf8\r\n=asm/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaksZxlXUPCBJ9Sab1l/tNLnYrpFbytvOmTp8qJV06zgIgNBUdBdfsyocozvPJfhQiBBRN4OmJc0eRwXYnf6fa+fo="}],"size":3262,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.1.0.tgz"},"maintainers":[{"name":"ryanflorence","email":"rpflorence@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-component_0.1.0_1535417507637_0.8211954246873874"},"_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":1535417507745,"_cnpm_publish_time":1535417507745,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}