{"_id":"@egoist/vue-to-react","_rev":"4-9caaba1d3f292ee3d1d126daeddb9a32","name":"@egoist/vue-to-react","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@egoist/vue-to-react","version":"1.0.0","description":"Turn a Vue component into a React component.","main":"dist/index.js","module":"dist/index.esm.js","scripts":{"test":"npm run lint","build":"bili src/index.js --format esm --format cjs","prepublishOnly":"npm run build","lint":"xo"},"publishConfig":{"access":"public"},"repository":{"url":"git+https://github.com/egoist/vue-to-react.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","devDependencies":{"bili":"^4.8.0","eslint-config-prettier":"^3.3.0","eslint-config-rem":"^4.0.0","eslint-plugin-prettier":"^3.0.0","eslint-plugin-react":"^7.14.2","husky":"^1.0.0-rc.13","lint-staged":"^7.2.0","poi":"^12.7.0","prettier":"^1.15.2","react":"^16.8.6","react-dom":"^16.8.6","vue":"^2.6.10","xo":"^0.23.0"},"xo":{"extends":["rem","plugin:react/recommended","plugin:prettier/recommended"],"envs":["browser"],"rules":{"react/display-name":"off"}},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["xo --fix","git add"],"*.{json,md}":["prettier --write","git add"]},"peerDependencies":{"react":"^16.8.6","vue":"^2.6.10"},"gitHead":"4125bfcc8c286da954d06298311860871713a2a5","bugs":{"url":"https://github.com/egoist/vue-to-react/issues"},"homepage":"https://github.com/egoist/vue-to-react#readme","_id":"@egoist/vue-to-react@1.0.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-kT7cBvwp8BMq4CT8rpij1VegHuf7XhcRQufD5Najcy5hISQpxfe7ZLNcMX4aBfhBJa5wAflCW18As6fMWwLzeQ==","shasum":"3a9496c8f129f06014311ba16e2c9bd85a5fc6f8","tarball":"https://registry.npmjs.org/@egoist/vue-to-react/-/vue-to-react-1.0.0.tgz","fileCount":5,"unpackedSize":5449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIKGHCRA9TVsSAnZWagAAlOgP/07oYIQMNUxyG7wqtOhM\n+qAzsGM/84E1s7tM6y6X4K+DfZtYmoMakZzj6RPgkJV9cFhNTipBhUiSkQYT\n6Baz8V3JiMnSawh0VOARalfsk2UhIWuXOJhMrap1mEb6ZMWS5qUIfVGD1xph\nzDYYuG5N1aGMnM/RNmx8nSiMjl5qCG7KSfyAAIoQ+MfuF53Qr649M7KuBxpL\ni/kfxQx1LRgWC6Gegcr7wOCXwTYNpBfPNwEhRvWus54pIGEiceD1srtx9vu7\nI2UIZkVpds5NTKcbRuOpkpYA9lTXj0vDmNVCQZqvd1Tw4ITDSENV8yF7bu7W\nuGOYb2CWTL/2pb84tG+fYxH8IqfzGHFJvZaFqBdu2VsE8dq6oc1Hq+DTFSJ6\n0RHJITw1ara7LNBIYz9CivU9IXymBtR8o0d4/BLhz3A/u9Y9q/GPcXgOdVxw\nU2emYZkvkRF+99G8LT2wmFkNz+0AJLy4F0YyPd1KDhEXL56lY1vLU/IC/GvO\no7/bsvWVgy4q4Ic2LUnVI+7ETJn8UyQMEGVtfYDudAVN6nx3ZEBrgMhIrJY2\nduS0uAbmYpF0EYW2zHy2fggd7b6ZA3HXCCeMxrlj9rORtBQIweoJOfJSIVv1\narSVJ5ri38SBmLbxkDO2wXmMsuvA4EKXX9LJSPUG0PWX8TPgwRCZi24ymBZ9\nf6gW\r\n=Ndxm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDt7dcARsdhyO/x4EzPWmhmmsl3sF0LrT6198awTaAYrAiBCVzkPr1pHXLQ4B0NXj42YAxMriNdiLO31olNP1IOliw=="}]},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-to-react_1.0.0_1562419590764_0.02756457179588412"},"_hasShrinkwrap":false},"1.0.1":{"name":"@egoist/vue-to-react","version":"1.0.1","description":"Turn a Vue component into a React component.","main":"dist/index.js","module":"dist/index.esm.js","scripts":{"test":"npm run lint","build":"bili src/index.js --format esm --format cjs","prepublishOnly":"npm run build","lint":"xo"},"publishConfig":{"access":"public"},"repository":{"url":"git+https://github.com/egoist/vue-to-react.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","devDependencies":{"bili":"^4.8.0","eslint-config-prettier":"^3.3.0","eslint-config-rem":"^4.0.0","eslint-plugin-prettier":"^3.0.0","eslint-plugin-react":"^7.14.2","husky":"^1.0.0-rc.13","lint-staged":"^7.2.0","poi":"^12.7.0","prettier":"^1.15.2","react":"^16.8.6","react-dom":"^16.8.6","vue":"^2.6.10","xo":"^0.23.0"},"xo":{"extends":["rem","plugin:react/recommended","plugin:prettier/recommended"],"envs":["browser"],"rules":{"react/display-name":"off"}},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["xo --fix","git add"],"*.{json,md}":["prettier --write","git add"]},"peerDependencies":{"react":"^16.8.6","vue":"^2.6.10"},"gitHead":"bca5fc0105eae35dd4803d5cc9e5fa1458cca53b","bugs":{"url":"https://github.com/egoist/vue-to-react/issues"},"homepage":"https://github.com/egoist/vue-to-react#readme","_id":"@egoist/vue-to-react@1.0.1","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WWKnpz70FHBv64+6J/mri2q77b7CN2ejhJwAl97SWS1gleXS+d60pJficIYXlXDFdqHIi7hNmi4jtpsz41nyyg==","shasum":"f82f0bc4850b25ef23960b90c26af496e76f9170","tarball":"https://registry.npmjs.org/@egoist/vue-to-react/-/vue-to-react-1.0.1.tgz","fileCount":5,"unpackedSize":5517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIbaxCRA9TVsSAnZWagAAwg8P/1wj108f5GUmD3sFWFYz\nV8WCu6yHchm7B2VUMO4I0csd3+jpsizbg661Ct4xvqhqA7iU1DWMftwQnkm9\nkHzEcKnDmUY92zyrvV0iNtNwE0KU70K/A/JNRnMETcOtvs9MxR80cfCgghNR\nD2Pcyc19/bdCKC8U1NfRBpqcV0LIgtHo0PuBitpX5FHi/k1UK+rrUvrISawi\n22B5HmFfQ7gWWF0YLnCjSmIMCv1AGSH9Gfgx0wPJjMXtRszAFkQnoSUbsxnh\nBiJeEPYnxd1wnmgxhUkmXm+xxlbB1M0WgxjVQZKZBlzzrbwq3fMMR0PZB60t\nZyaLRlSldmlNAmAPGgwZ7sLnzqJIeErjtpeJwabhoCsV4npi7edibMupSRZO\nTUE1lVRGIM3jkknQDxYIevAVBRxMSMDrwVBbaj2MrQm4ttxSU2+E/CmctZzp\niyHLK3HT7tBQx0tRf1VI/gN4uPqid3td3egi4nN+E0OG5dP5P7OAFyQ7jp9Y\n2zPVTOdL3IGTa9lqfYQcRC+EVd0ru0zxGPwNwfcRTAOYFuVu6HWhBnHN1WsE\nzc/4zdrsOzhq8VQGGCmKGbsoP160+L6O7o2FT873FaM4nSyJMjToaaYI9pwG\nJkgWjRwpU/My4O2UhS0mMLZEJToD3ylvpk7m0nqpMI1B4X5JDmuOywWV33jL\nwKxA\r\n=BYm1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB1REiLio+PoCF3kTdu4VM8R73lZE7k8oR2YgvW58eigIhAO7ZhVLVly2/J9CsK4xtmXN17005R8Jl6Wnrll+Yvsi9"}]},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-to-react_1.0.1_1562490544880_0.881572591247187"},"_hasShrinkwrap":false},"1.1.0":{"name":"@egoist/vue-to-react","version":"1.1.0","description":"Turn a Vue component into a React component.","main":"dist/index.js","module":"dist/index.esm.js","scripts":{"test":"npm run lint","build":"bili src/index.js --format esm --format cjs","prepublishOnly":"npm run build","lint":"xo"},"publishConfig":{"access":"public"},"repository":{"url":"git+https://github.com/egoist/vue-to-react.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","devDependencies":{"bili":"^4.8.0","eslint-config-prettier":"^3.3.0","eslint-config-rem":"^4.0.0","eslint-plugin-prettier":"^3.0.0","eslint-plugin-react":"^7.14.2","husky":"^1.0.0-rc.13","lint-staged":"^7.2.0","poi":"^12.7.0","prettier":"^1.15.2","react":"^16.8.6","react-dom":"^16.8.6","vue":"^2.6.10","xo":"^0.23.0"},"xo":{"extends":["rem","plugin:react/recommended","plugin:prettier/recommended"],"envs":["browser"],"rules":{"react/display-name":"off"}},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["xo --fix","git add"],"*.{json,md}":["prettier --write","git add"]},"peerDependencies":{"react":"^16.8.6","vue":"^2.6.10"},"gitHead":"f08fbd4eab69efc87ed46e1acbd397be224a0171","bugs":{"url":"https://github.com/egoist/vue-to-react/issues"},"homepage":"https://github.com/egoist/vue-to-react#readme","_id":"@egoist/vue-to-react@1.1.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-MwfwXHDh6ptZGLEtNLPXp2Wghteav7mzpT2Mcwl3NZWKF814i5hhHnNkVrcQQEuxUroSWQqzxLkMKSb+nhPang==","shasum":"83c884b8608e8ee62e76c03e91ce9c26063a91ad","tarball":"https://registry.npmjs.org/@egoist/vue-to-react/-/vue-to-react-1.1.0.tgz","fileCount":5,"unpackedSize":6738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIeBkCRA9TVsSAnZWagAAqYkP/0h6EEiEmnkbr1SWQXYr\noAGVbq+fUbCUHPJoQsXLiSjrzQ/2HfEMwy+2wfgg2tnVzHHi+5NOSrMWqkAd\nUW0T2E9O+NAS1w6rbdH8SqM425Ur3C1u5Z7z4tLNWOIoOVxtU/xxMjLsMzoy\ndUFjGhZTwkKpvf2FRo8zEBwkHIpVGTsBJmUu+40aKMaYr1clHCtdRCGJ4PBh\nvyn+JvrMB0bZYSXFYsVHD+eOzfWpWFeD/xko5uKlmV2oSv1iI8x6zDrJ0Yzg\nFonVgiIM9lqYps9QnnAOTeUtafncyVWEWcqMuO35GwjPku9AGD3vkNZlGF44\nZpKZrkTNnQ1MS1xr4bGVrzjO6PoNCAbY2lkevwlT0mpBUznj1Z/e3V29KtYA\n2ip2Si8jmelZ07wf5nB3sHkKpTWqmNq5WmAthGq7TzxHxcUTY4T9P0z5t+ci\nb7WYoEdnFmgQp50pBDqpG7FxeqLIOZZAHhQfSVTbrvwFKchN+89WuFpP8InN\nKUVIN+LRLLW9bkKqoQ1pgjGbi8oYh2mL/X0Y4Nv322TDCGcFbeIWxuSj/P6P\nO2P1e4Kiq4qBPRg0ZpYCN5yDsubQq4huzI9J60lqpM8aKZwwZ91kcl994V9v\nfWyWGlxQQlMeoPERrDt6s2t/XcEs28lvR1QGrCZiSYb4MVddKQmTfGW332se\nCEbc\r\n=ulIC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5SszUsX+9Os6E7LUBFr10F+Z6OdY67vmzofh0FXM6owIhAKld8Gt2uPCbL0tPngP/eDfKm+MilTJOilpx2mHl4gI3"}]},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-to-react_1.1.0_1562501219736_0.5719727948168039"},"_hasShrinkwrap":false},"1.2.0":{"name":"@egoist/vue-to-react","version":"1.2.0","description":"Turn a Vue component into a React component.","main":"dist/index.js","module":"dist/index.mjs","scripts":{"test":"echo lol","build":"rollup -c","prepublishOnly":"npm run build"},"publishConfig":{"access":"public"},"repository":{"url":"git+https://github.com/egoist/vue-to-react.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","devDependencies":{"@types/react":"^17.0.13","esbuild":"^0.12.15","prettier":"^1.15.2","react":"^16.8.6","react-dom":"^16.8.6","rollup":"^2.52.7","rollup-plugin-dts":"^3.0.2","rollup-plugin-esbuild":"^4.5.0","typescript":"^4.3.5","vite":"^2.4.0","vue":"^2.6.10"},"peerDependencies":{"react":"^16.8.6 || ^17","vue":"^2.6.10 || ^3.0.0"},"gitHead":"e9355e88f8c3e65eb55769518144a2844172f456","bugs":{"url":"https://github.com/egoist/vue-to-react/issues"},"homepage":"https://github.com/egoist/vue-to-react#readme","_id":"@egoist/vue-to-react@1.2.0","_nodeVersion":"16.3.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-uUtkzw+jtB1t++XjgwmzD/cgPVs7ZWyypw/IjciwZHNWODb/Ij19KJIkwxxKqokzopxmgbJKK4a5Zj9d9+WrPA==","shasum":"ae8dfdadae5a0a14ecc6b44c86ae339bc1622082","tarball":"https://registry.npmjs.org/@egoist/vue-to-react/-/vue-to-react-1.2.0.tgz","fileCount":6,"unpackedSize":7104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5EE5CRA9TVsSAnZWagAARXAP/AxSQrZssh7NiRaTPMuw\nqzTkoBnkivFtZD5tUqW4cUcIcJbWY9In9cgySriXNSux8i9IvYo7WLrWhAN9\nPmUzVaqosZ2LyIZcgp4nxlmouizoalrw9YyLsibpLKG7MZlnGRCLWEtR7qBg\nxsqEsiJfmWkVp54rD3LiOrEelD+GK9oix3B4vl/LihBY+xVD3dTdZ/xTqeCH\n+mgB1y7MQcxeKeTh5fo1bm/n6UkrmDkl8NM5MwVp8t2psRnNfi6DTOd4yiBc\nosgYiVOV0lgPhG2x6Dm0J0lRUMiD6zEh4JolL+l4jnAf3e1JJ1K5HPhUPt/Q\nAtHvi+OFYSUIx6GPreS75Kx8sylXXf71gDALQlUlzpNwRFwPnRPcC3DK9Vpy\nD5G5CUrMXOZ9Wi4HbGqzcipSmjeBm8Rjcz6ubJaO25ghzBe+J3bjt2GjTzE+\nlWQATEe565vDkGfNb0eOZwmn0QmJswksYYGGDGcyHA+Wa99qGrzF2S9Fyy51\nSXL2/k0+cl8wqSM/YQg8lkX7EJqWWyWdUXvv6Taszph5SDaAFMEcbdg4fXRA\n7rRpuHz1l+j7be7m6qvhYgmFbhsF4wSftb5cxixW+EkjnL2fCQW8ZksEZ0lz\njlh/90RGho47MUyFU0AdmdofW08YjmyPCybkuI6SDOz11JX9CvlUPB4d/zco\nEyDw\r\n=CjD1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBa8wJY/52M0kq3g9pdu9UZK6mvAcZepsTHcIJP/RneNAiB6BuxlTdgXXBY5LAKp/DsYhIZmwcZAYqAcmPSJAwv5Fg=="}]},"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-to-react_1.2.0_1625571640341_0.3529497151880796"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-06T13:26:30.548Z","1.0.0":"2019-07-06T13:26:30.926Z","modified":"2022-04-05T06:57:22.348Z","1.0.1":"2019-07-07T09:09:04.973Z","1.1.0":"2019-07-07T12:06:59.838Z","1.2.0":"2021-07-06T11:40:40.652Z"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"description":"Turn a Vue component into a React component.","homepage":"https://github.com/egoist/vue-to-react#readme","repository":{"url":"git+https://github.com/egoist/vue-to-react.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"bugs":{"url":"https://github.com/egoist/vue-to-react/issues"},"license":"MIT","readme":"# vue-to-react\n\n[![NPM version](https://badgen.net/npm/v/@egoist/vue-to-react)](https://npmjs.com/package/@egoist/vue-to-react) [![NPM downloads](https://badgen.net/npm/dm/@egoist/vue-to-react)](https://npmjs.com/package/@egoist/vue-to-react) [![CircleCI](https://badgen.net/circleci/github/egoist/vue-to-react/master)](https://circleci.com/gh/egoist/vue-to-react/tree/master) [![donate](https://badgen.net/badge/support%20me/donate/ff69b4)](https://github.com/sponsors/egoist)\n\nThis works for both Vue 2 and Vue 3.\n\n## Install\n\n```bash\nyarn add @egoist/vue-to-react\n```\n\n## Usage\n\n```js\nimport React from 'react'\nimport { render } from 'react-dom'\nimport toReact from '@egoist/vue-to-react'\n\nconst VueComponent = {\n  data() {\n    return {\n      count: 0\n    }\n  },\n\n  render(h) {\n    return h(\n      'button',\n      {\n        on: {\n          click: () => this.count++\n        }\n      },\n      [this.count]\n    )\n  }\n}\n\nconst ReactComponent = toReact(VueComponent)\n\nrender(<ReactComponent />, document.getElementById('app'))\n```\n\n### Passing Props\n\nBy default we pass all props from React to Vue:\n\n```js\nconst Counter = toReact({\n  props: ['initialCount'],\n  render(h) {\n    return h('button', {}, [this.initialCount])\n  }\n})\n\nconst App = <Counter initialCount={0} />\n```\n\nHowever you can customize how the props are passed to Vue with the `passProps` option:\n\n```js\ntoReact(VueComponent, {\n  // Only pass `initialCount` prop\n  passProps: props => ({ initialCount: props.initialCount }),\n  // Or disable props\n  passProps: false\n})\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n**@egoist/vue-to-react** © [EGOIST](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>\nAuthored and maintained by EGOIST with help from contributors ([list](https://github.com/egoist/vue-to-react/contributors)).\n\n> [github.com/egoist](https://github.com/egoist) · GitHub [@EGOIST](https://github.com/egoist) · Twitter [@\\_egoistlily](https://twitter.com/_egoistlily)\n","readmeFilename":"README.md"}