{"name":"@reach/component-component","version":"0.8.2","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":"yarn clean && node ./build-package","clean":"rm -rf ./dist","compile":"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":"ed24a5bb43a87adc36179283ca1de2c5af4ea26e","bugs":{"url":"https://github.com/reach/reach-ui/issues"},"homepage":"https://github.com/reach/reach-ui#readme","_id":"@reach/component-component@0.8.2","_nodeVersion":"13.8.0","_npmVersion":"lerna/3.20.2/node@v13.8.0+x64 (linux)","dist":{"integrity":"sha512-3N9baC2t6jatMYuQj0sPWN/VcK6EH//ywSqbpLXZiRQZXLIQkuelOHRYzfufRbPCIJQipYBko4Q8jg4Jc4nF/w==","shasum":"87590421b90ecf57cffcee61f1210ba63202fef8","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.8.2.tgz","fileCount":5,"unpackedSize":14602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePgQJCRA9TVsSAnZWagAAPVIP/0NAcYUCgO/RoqE+yzY6\nhRYAM+SP/DXNfzH0W7BrH0aZttTgOFogfP+HgQBRb+CcRZ7BOzl/aZeqLxTI\nlWyQzII2fnfUvNUmJOq9eUM1jkFBr/KALHDBuD1avEGe3tCZq2Hab2m/GxoQ\nRU0U07KxZe8OL4Rmc1eUhAsYivgspIgBEuebkm+o8BZi5zP4Fk5GcWNttDgJ\nnaAwhwHf16m5AXYwiRiG0LwrACW2HiYi/89MlveelVeQItBWhUDkIclF1Vvm\nU3y4Flc2BPUJef19rh2KluRuegxMyzbGxgBZ/vVf2h+dAnWzuSQKmYFMrj6M\n9pFi8+VcLZnMVZJf89Vck8Gr3lGSy01gCANNsbG7wu3Q2h5iNnrA1PMtmtfy\nmsQXbdOmtm9LTKjk/k6QAXL+2MUrOOKv7fDP6s3diRnz364lrN3oZrSihGe1\nOzFg07g18LG/gT9xu/dA2IzQHhC/rmGWx6SWoFN5M3ChkpUbyRiSsrQY/VeV\nb6EbotgzCaU+QaIHXEQrPLcWsm3AdslcUzxeI2rhiWuT6p4qs8Euzzih9oQh\ns7JIWheHp/ZH/14MRVzYrKklZHhanmLDLXtrizSUI29JsFyoduKkgw/1P45u\nD+00IjjbFG/5Ovnk/wTGHkYu8095LYqAfW2Tx90BkZ6ZiyjC/PnMz5L9DSAW\n9/gb\r\n=T1I+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHg8d+YLtOFbwifGy1IeH4S/IiPti/+86nmMrbZ6cnJGAiEAxTA49BNPEzHlIOrdoLUNXu8muMZHa8kwRLy7daLpxp4="}],"size":3765,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.8.2.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.8.2_1581122568854_0.23688690379879263"},"_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":1581122569016,"_cnpm_publish_time":1581122569016,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}