{"dist":{"shasum":"e023608f0f819f28b080dfaeafa21987a4b2ee27","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.4.6-3.tgz","fileCount":5,"integrity":"sha512-GQvR0S7RWOtEGkJr8oUKVs39QDAIYHchqvyr14x27p3ZmJ5ERm23vOyI0xwP4WxBw16W28DsTrc/NzZ3fYrxxw==","signatures":[{"sig":"MEYCIQDn0VfBYYt2ngAiE34jmHTdtlo3o7in0EgcTefTkw2iHQIhAJkxStQF2QMskJBYdTs2SDBHajKMDO41lACg6LqSJrfu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehA4HCRA9TVsSAnZWagAAE9cP/18P2RFR9IaYRU6bSI5P\nfK2FZ2aqTdl5p76sowcy3W8srt64yoxCQZVJUPJxNNo+xSduhc62IJSA9aMq\nyC0iQxTbHQwXnTFgmzVYYVooBG9Qo0XIuhxxRYa7rFu6t7hyQ3ew7Y/QQ0Xu\nF5M4Wea0rrin8mHsZW4Pyd77f8PqgXnNqbsM3leFUEPZIuvV05pJFHjjJrH3\nWn2j/YjtBxkM5s1HOYV2x2OXAUjFTA2zBKc0DWwEMFQSQdAE9TUD9+MN9Um/\nd0+xEkiB2fP+h5uVDXs+St1mu0KiQZ2CSgi4G+9nE9LvVBJy+eL/jwedzbob\nU5mkE15WKmJjHMK5HrZ/rqQ29kXi2DzwemJdZxxp14sIXsnZtfq2Xe3LPKPR\nzlEs9mg9NiQm7+Cb95aN1+xGld9ud/H2A0E367sLdS2hVEbQz5yGewQZRCxS\nOYgCCaRTH0nGcECBeUsY88a7A1d+SRF8tTxJqRsUpLWKb67Snyx7ZGOw8/5i\nNtQjsvobZqO2bCw6+4OoQ0rDoDxMMC5GbCZpZbwkYMz6bykybksZiBlinHWm\nJXRx8q+OJQeoDs2HtXYgCP+tCsDUEue3fkBepG8usSZ5lfrNjoKIciP1om0i\nbfX/6J/oEXo3siI1ErwM8o8eJpuYhZ5DViIf0nrstXB9cOXtuQuPWTBjnbSB\nVGER\r\n=uhoY\r\n-----END PGP SIGNATURE-----\r\n"},"name":"jsx2mp-runtime","author":{"name":"Rax Team"},"readme":"# jsx2mp-runtime\n\nProvide runtime support for rax style miniapp.\n\n- createComponent\n   ```js\n   const __class_def__ = class {\n     state = {\n       name: 'Rax'\n     };\n   \n     handleTap() {\n       this.setState({\n         name: 'MiniApp'\n       });\n     }\n   };\n   \n   const config = createComponent(__class_def__, 'class');\n\n  Component(config);\n  ```\n- (state) useState(defaultValue, key)\n  ```js\n  const __fn_def__ = function Header(props) {\n    const [name, setName] = useState('World', 'name');\n    const [count, setCount] = useState(0, 'count');\n  \n    return {\n      handleClick() {\n        setName('Rax');\n        setCount(count + 1);\n      }\n    }\n  };\n  \n  const config = createComponent(__fn_def__, 'function');\n  Component(config);\n  ```\n- (void) useEffect(callback)\n  ```js\n  const __fn_def__ = function Header(props) {\n    const [name, setName] = useState('World', 'name');\n    useEffect(() => {\n      console.log('didMount');\n  \n      return function unmount() {\n        console.log('unmount');\n      };\n    }, []);\n  \n    return {\n      handleClick: () => {\n        setName('Rax');\n      },\n    };\n  };\n  \n  const config = createComponent(__fn_def__, 'function');\n  Component(config);\n  ```\n","scripts":{"build":"cross-env NODE_ENV=production rollup -c rollup.config.js","prepublish":"npm run build"},"_npmUser":{"name":"solojiang","email":"feifeishen1996@gmail.com"},"_npmVersion":"6.10.3","description":"Runtime for jsx2mp.","directories":{},"maintainers":[{"name":"chriscindy","email":"yxy0919@foxmail.com"},{"name":"likai757","email":"likai757@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"zeroling","email":"wssgcg1213@qq.com"}],"miniprogram":{"ali":"dist/jsx2mp-runtime.ali.esm.js","wechat":"dist/jsx2mp-runtime.wechat.esm.js","quickapp":"dist/jsx2mp-runtime.quickapp.esm.js"},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rollup":"^1.13.1","cross-env":"^5.2.0","@babel/core":"^7.4.5","@babel/types":"^7.8.3","universal-env":"^3.0.0","@babel/preset-env":"^7.4.5","rollup-plugin-babel":"^4.3.2","rollup-plugin-cleanup":"^3.1.1","rollup-plugin-replace":"^2.2.0","rollup-plugin-filesize":"^6.1.0","@babel/plugin-proposal-class-properties":"^7.5.5"},"_npmOperationalInternal":{"tmp":"tmp/jsx2mp-runtime_0.4.6-3_1585712646512_0.036791699973636405","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.4.6-3","version":"0.4.6-3"}