{"name":"@reach/component-component","version":"0.14.0","description":"Declarative React Component Definitions","author":{"name":"React Training","email":"hello@reacttraining.com"},"license":"MIT","sideEffects":false,"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.1","react-dom":"^17.0.1"},"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":"80f6ca5f8d25a10887e2bd34d60094402b9bc0a7","bugs":{"url":"https://github.com/reach/reach-ui/issues"},"homepage":"https://github.com/reach/reach-ui#readme","_id":"@reach/component-component@0.14.0","_nodeVersion":"15.12.0","_npmVersion":"lerna/3.22.1/node@v15.12.0+x64 (linux)","dist":{"integrity":"sha512-QdcVh0NrV7BG28smxsS1DbJSQheENVpqR9CyHyFsC1HKYBcckDtPUInFA7MH4/vTsM/3nsFLwnv7UrSQg9cF3A==","shasum":"d6e3debfa851c185eaaea52317a012ca54d41d9b","tarball":"http://registry-npm.ywwl.com/@reach/component-component/download/@reach/component-component-0.14.0.tgz","fileCount":7,"unpackedSize":17514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYO6nCRA9TVsSAnZWagAAIP4QAJlztYEnQ5vsuB4S4oHL\nCACmuysSmBQpFYcwNxL+5agug1Wa/7PlJHWdq+yWYgoCx2A0VNTsMsr7Pord\nCvJDrAG9uZCPVL3a0JFyMMTak+hRsYYd0S6TjYXWREs85b1Tled5jcXc6cs4\nR8iAhx+fszxPJ9nUohNUn9WRiBXsPyMiJ8Z2cxkVBxSmxtYypal/poMeazJb\n46ShL6PsEESvr1HQxzCl0Q7Iz2t6PU4PxJl/gjfTN2uwB1Oxjq+0w0hUW/k4\n0PlwdOnNmLygnCQRjoZRUAykUHkaQ/Zw7DntQulaKzeEtzIUwfey3O6iIDP8\noh99aOcPUzTokzn2c74z/9jfVD8pnQHszBYvOjYMXDfR/2z2dV1IhvK63pL5\niP5fWCntdZrouN6SbIUqGiE9fDZlfEotAGkLH5XtbR+75cG99755TeCPYqDh\nnY1a965iOp6cFVrywQU3o7OyHYESvYUk5oLh1ujju2pi94a3bCjnwqT0pOze\nPqYLQ2rEShbDkL+3UJVybEYci1qO8jMkO8H/UQq6Ci9+IZMAi6l0s9f/2LmQ\no7M8u9kC0PyBgmNNR2i/ACynEG2SRWw1oyM/EJs2oaMqW/uDVoGHR8UFKqUG\n6UNrzxuVO2vCYNqiGKB668I3WVy6XthUs9YS140xVFFQa+FHrYCznik1qEPC\nTRUi\r\n=GKb6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC2ZjL1L40DM+GJnHdRikxuchhPnHL09h56yAPb/6vBaAiBi4Oyl/J80ils+vmt1Jj0qQjEHM6LGa9CX+UPH8QhFPg=="}],"size":3639,"noattachment":false,"key":"/@reach/component-component/-/@reach/component-component-0.14.0.tgz"},"_npmUser":{"name":"mjackson","email":"npm@mjackson.me"},"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.14.0_1616965286939_0.2531267441539684"},"_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":1616965287085,"_cnpm_publish_time":1616965287085,"dist-tags":{"latest":"0.17.0","next":"0.4.0-beta.0"}}