{"_id":"render-fragment","_rev":"470634","name":"render-fragment","description":"A convenient way to return a JSX fragment without the wrapping `div` element and not worry about the version of React.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"donavon","email":"github@donavon.com"}],"time":{"modified":"2021-08-05T08:17:16.000Z","created":"2017-11-30T19:41:15.857Z","0.1.1":"2017-11-30T21:33:52.772Z","0.1.0":"2017-11-30T19:41:15.857Z"},"users":{},"author":{"name":"Donavon West","email":"github@donavon.com","url":"http://donavon.com"},"repository":{"type":"git","url":"git+https://github.com/donavon/render-fragment.git"},"versions":{"0.1.1":{"name":"render-fragment","version":"0.1.1","description":"A convenient way to return a JSX fragment without the wrapping `div` element and not worry about the version of React.","main":"./lib/index.js","scripts":{"prepublish":"npm run lint && npm run _build && npm run _test","build":"npm run lint && npm run _build","_build":"babel src --out-dir lib --ignore '**/*.test.js'","test":"npm run lint && npm run _test","posttest":"cowsay Your tests all passed!","_test":"echo","test:watch":"jest --watch","coveralls":"cat ./coverage/lcov.info | coveralls","lint":"eslint src"},"repository":{"type":"git","url":"git+https://github.com/donavon/render-fragment.git"},"keywords":["react","react16","fragment","array","components"],"author":{"name":"Donavon West","email":"github@donavon.com","url":"http://donavon.com"},"license":"MIT","bugs":{"url":"https://github.com/donavon/render-fragment/issues"},"homepage":"https://github.com/donavon/render-fragment#readme","peerDependencies":{"react":"^15.0.0 || ^16.0.0","prop-types":"^15.0.0 || ^16.0.0"},"devDependencies":{"babel-cli":"^6.24.1","babel-eslint":"^8.0.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","cowsay":"^1.2.1","eslint":"^3.19.0","eslint-config-airbnb":"^15.0.1","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-react":"^7.5.1","prop-types":"^15.6.0","react":"^16.2.0"},"_id":"render-fragment@0.1.1","_npmVersion":"5.5.1","_nodeVersion":"6.9.2","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"shasum":"b231f259b7eee333d34256aee0ef3169be7bef30","size":3077,"noattachment":false,"key":"/render-fragment/-/render-fragment-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/render-fragment/download/render-fragment-0.1.1.tgz"},"maintainers":[{"name":"donavon","email":"github@donavon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/render-fragment-0.1.1.tgz_1512077632652_0.9910180696751922"},"directories":{},"publish_time":1512077632772,"_hasShrinkwrap":false,"_cnpm_publish_time":1512077632772},"0.1.0":{"name":"render-fragment","version":"0.1.0","description":"A convenient way to return a JSX fragment without the wrapping `div` element and not worry about the version of React.","main":"./lib/index.jsx","scripts":{"prepublish":"npm run lint && npm run _build && npm run _test","build":"npm run lint && npm run _build","_build":"babel src --out-dir lib --ignore '**/*.test.js'","test":"npm run lint && npm run _test","posttest":"cowsay Your tests all passed!","_test":"echo","test:watch":"jest --watch","coveralls":"cat ./coverage/lcov.info | coveralls","lint":"eslint src"},"repository":{"type":"git","url":"git+https://github.com/donavon/render-fragment.git"},"keywords":["react","react16","fragment","array","components"],"author":{"name":"Donavon West","email":"github@donavon.com","url":"http://donavon.com"},"license":"MIT","bugs":{"url":"https://github.com/donavon/render-fragment/issues"},"homepage":"https://github.com/donavon/render-fragment#readme","peerDependencies":{"react":"^15.0.0 || ^16.0.0","prop-types":"^15.0.0 || ^16.0.0"},"devDependencies":{"babel-cli":"^6.24.1","babel-eslint":"^8.0.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","cowsay":"^1.2.1","eslint":"^3.19.0","eslint-config-airbnb":"^15.0.1","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^5.0.3","eslint-plugin-react":"^7.5.1","prop-types":"^15.6.0","react":"^16.2.0"},"_id":"render-fragment@0.1.0","_npmVersion":"5.5.1","_nodeVersion":"6.9.2","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"shasum":"32e15b260041dfb37066c91395ae9fb99ac56a8b","size":3078,"noattachment":false,"key":"/render-fragment/-/render-fragment-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/render-fragment/download/render-fragment-0.1.0.tgz"},"maintainers":[{"name":"donavon","email":"github@donavon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/render-fragment-0.1.0.tgz_1512070875777_0.4475849559530616"},"directories":{},"publish_time":1512070875857,"_hasShrinkwrap":false,"_cnpm_publish_time":1512070875857}},"readme":"# render-fragment\n\nA convenient way to return a JSX fragment without the wrapping `div`\nelement and not worry about the version of React.\n\n## Install\n```bash\n$ npm i --save render-fragment\n```\n\nWith the introduction of React 16.2, you can now return a fragment\n(i.e. multiple elements that are not under a single element).\nIn previous versions, you were required to return either a \nsingle element (in version 15.x)\nor an array (in version 16.0 and 16.1).\n\n```js\nimport Fragment from 'render-fragment';\n\nconst App = () => (\n  <Fragment>\n    <div>A</div>\n    <div>B</div>\n  </Fragment>\n);\n```\n\nIf you are running React 15.x, it will render a wrapping `<div>`. \nFor React 16.0 and 16.1, it will render an array. \nFor React 16.2 and above, it will render a `<React.Fragment>`.\n\nThis way you can use the same markup regardless of the version\nof React that you are using.\nThis is really useful for component designers that have React\ninstalled as a peerDependency.\n\nSee live example on [CodeSandbox](https://codesandbox.io/s/xp55rmrz8w).\n","_attachments":{},"homepage":"https://github.com/donavon/render-fragment#readme","bugs":{"url":"https://github.com/donavon/render-fragment/issues"},"license":"MIT"}