{"name":"jsx2mp-runtime","version":"0.1.1-0","description":"Runtime for jsx2mp.","main":"dist/jsx2mp-runtime.esm.js","scripts":{"build":"cross-env NODE_ENV=production rollup -c rollup.config.js","prepublish":"npm run build"},"author":{"name":"Rax Team"},"devDependencies":{"@babel/core":"^7.4.5","@babel/preset-env":"^7.4.5","cross-env":"^5.2.0","rollup":"^1.13.1","rollup-plugin-babel":"^4.3.2","rollup-plugin-filesize":"^6.1.0","rollup-plugin-replace":"^2.2.0"},"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","readmeFilename":"README.md","_id":"jsx2mp-runtime@0.1.1-0","_nodeVersion":"8.11.3","_npmVersion":"6.10.0","dist":{"integrity":"sha512-B4fVXnzVj9fbxcSdevMBLzMXM8NrVdFhTykhTUP/F0ZVAIfED4fz3YthRGnRgADCQRGGu3xNUOEHwJo6IaWYoQ==","shasum":"f422cca57ed095a7ab4e6722eed7554463ed2db7","tarball":"http://registry-npm.ywwl.com/jsx2mp-runtime/download/jsx2mp-runtime-0.1.1-0.tgz","fileCount":3,"unpackedSize":21673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJwaJCRA9TVsSAnZWagAAXkEP+wSQItMxVpQ4ugxcDFvG\nW1NJmW/RRTJWOiwnUnoMG3Lj5qrZ1kMThDyLpefT0ogNxLQAUG4rhNQdXjEY\nhpyymb1Z/qiSjk//npoFAEyelBXoAtqyJoPRrIIvedTaUVeaVY03B09xLuwp\nWQp7HqAojxi11tBWxe4q6PFH7qJ6XVRy04F2okW8Hs/LJ5cyyw3VVkhXjOna\nic5aj0/22ejX8YTfijtmRD/biCu1Iik6Q8LZbB2tP0plhsX0dgLVmAbo1MF1\n2FLIGsH2dRrGg3TAGSGAfFNmkOxoGLNaErF5B82flt4MmLBSEYxmid3JbSwo\n3ia8lzuERrML6IBFWU38u/i7rFGD71WVuNWxqMQ+d55tf+f6wC95wzLgC/YN\nJE6/bbSrZiOQ3Q+P1HBFH9Y8hQliexmaWYadTHnxNVudpRtFWTxVDjsoZ09P\n7Tljwgx0MLzNkUGA2LCd7MSwFjSJW7IVlcZeymMhysSO7GFyzXwul2mXUJQG\nsVEhsTxtaPTAa4fAqVTZ3VfCLQSCztzNMHyC+/SG+f6eJ9QCmt3AQdSMbfHy\nSQFbMQ9pn5hvX6MvSqXBKcDVwpgBormnnMr+qnySc38KTnjILDg1wJYYOVX5\nl9mQ02HnqbRdOz/ZcZRavpZoqzFdpTo9QdTJ78GZ/SAcS5le6BxYfUUGmFO2\nff6q\r\n=ENSp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1Ta5xOF0OG9lrMsoJhLMykRnqq/C5poB5QRLMwitJDAiAchv/fvw82mq1Eu61Peq/DTJyiLjTlngyDQCkB6eQG7w=="}],"size":6170,"noattachment":false,"key":"/jsx2mp-runtime/-/jsx2mp-runtime-0.1.1-0.tgz"},"maintainers":[{"name":"zeroling","email":"wssgcg1213@qq.com"}],"_npmUser":{"name":"zeroling","email":"wssgcg1213@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsx2mp-runtime_0.1.1-0_1562838665087_0.10485676439810865"},"_hasShrinkwrap":false,"publish_time":1562838665225,"_cnpm_publish_time":1562838665225,"dist-tags":{"beta":"0.4.26-2","latest":"0.4.25"}}