{"name":"jsx2mp-runtime","version":"0.4.15-1","description":"Runtime for jsx2mp.","miniprogram":{"ali":"dist/jsx2mp-runtime.ali.esm.js","wechat":"dist/jsx2mp-runtime.wechat.esm.js","quickapp":"dist/jsx2mp-runtime.quickapp.esm.js","bytedance":"dist/jsx2mp-runtime.bytedance.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/plugin-proposal-class-properties":"^7.5.5","@babel/preset-env":"^7.4.5","@babel/types":"^7.8.3","cross-env":"^5.2.0","rollup":"^1.13.1","rollup-plugin-babel":"^4.3.2","rollup-plugin-cleanup":"^3.1.1","rollup-plugin-filesize":"^6.1.0","rollup-plugin-replace":"^2.2.0","universal-env":"^3.0.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.4.15-1","_nodeVersion":"10.14.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-VNVSfAnZBNskXZgi6rY+519WpwtHwZth0Yy7IwDa4kJOsw+90NEZNF67P6AdJ9kc5LtqvV6qh/b2oQdJ/cAThQ==","shasum":"240a9a5a3866abf798b495c425593794319e0a21","tarball":"http://registry-npm.ywwl.com/jsx2mp-runtime/download/jsx2mp-runtime-0.4.15-1.tgz","fileCount":6,"unpackedSize":201262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR8sICRA9TVsSAnZWagAAqCsP/jpSYD7cmPG3z1KVtCtZ\n+D+LRJPxHzfprmXfkK2Wx2UONfYlGohIVC/di2EzW5YpMioA3Zw10R+xEtER\nAV/O5HSQczD49NL7QCMB/ypwuPyMqt8tlUTQ1S4ONM6KZ/TX0Sn8GhYXPyp3\nqW5gyhu5UmhvrmrMG/c/SMnWZoqclr5yzZ7iMIHOiVyg0b3dCQiNWPHCB9hW\noHuFRLPdHRWi609ADhzdi2qg8TfWs+crnTs7u2WugB29LmaQZlpq7aH7dLmb\nTUFoZ4+ArFWky+PwKsLfmqow4ugE/i/jRHf8/4vcJlFbQ8zox8sGVBWjIWBm\nfxW56jF97IAWOoPwwQArgq+2ZAl34nG+kMPX/TWek9SKf5Tt+da9NyEGmQAL\nJUClE4QlLSnTPjBE4K7feyjhfhGTYRMj70JZsOcYh+p3+5IUclvLFdli7vHd\nh409WI50RFrEz16xeCDE8fnurXmkJ9SIMb0+6zZBNB+9vfeXJxtQcBiah1NS\nToOMw4D4xrVfF10NWd7Qblrk3lOSV9iH4VyDAzkVF0V2YXRGg1qSrz2k5stN\nYXUhFuhUh9ag3gy2lcMuHjOLknSx/0i/e7OtVaoTsJI559tmUFNL9ktF2adK\nVKTFiqHenip96n8zUFWrzAG+c47qT3kL/xaN6jv9HySlZCQB3CJb5G3mNIdf\n1zRT\r\n=vdwd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChv7UvluKW69+t6h/PhzoY4BrG1qc3jg/mhnMGUgNf1AIhAJtBmhtoan6pNQzYyxRsL16quW8PucDcU6UPFI8iNwlP"}],"size":44736,"noattachment":false,"key":"/jsx2mp-runtime/-/jsx2mp-runtime-0.4.15-1.tgz"},"maintainers":[{"email":"yxy0919@foxmail.com","name":"chriscindy"},{"email":"likai757@gmail.com","name":"likai757"},{"email":"rax-public@alibaba-inc.com","name":"rax-publisher"},{"email":"feifeishen1996@gmail.com","name":"solojiang"},{"email":"wssgcg1213@qq.com","name":"zeroling"}],"_npmUser":{"name":"solojiang","email":"feifeishen1996@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsx2mp-runtime_0.4.15-1_1598540551966_0.4996245376317927"},"_hasShrinkwrap":false,"publish_time":1598540552098,"_cnpm_publish_time":1598540552098,"dist-tags":{"beta":"0.4.26-2","latest":"0.4.25"}}