{"name":"jsx2mp-runtime","version":"0.4.13-0","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.13-0","_nodeVersion":"10.16.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ZK6OBPUKpZ1jFo6Pi7rg0ojL2llXKeq57UZPl7q5mJ+hyTrwuiwYln/FryLqISHoWCGjEx9tgINJrDwkJ/kG9A==","shasum":"ab107a82905156b7cd48401fdbba17bc1ca5452e","tarball":"http://registry-npm.ywwl.com/jsx2mp-runtime/download/jsx2mp-runtime-0.4.13-0.tgz","fileCount":6,"unpackedSize":199434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezisMCRA9TVsSAnZWagAA4lsP/1mKliI7XluMBal6/pep\nbsB++jy5qhi/4iN23x6swmzldxgFfTtUmHHTeCbENqWEyNO1HNtHMWdzR63x\ns0t2ZExRydzNnXFKt04XoDjwHSUAl2UWSvmmKfpqkgqjtJN99iD7zEtqqqE/\nzPCJdyx00X3vfClNScN3ZAq6UV4C3yc9GrNCMyRj6c8GxivBYzB1u/Yyq3ww\niwssJKQASzk8liw/70QomLdv4/oyXrQ4wmmEBLCqiS5sBQw68kq/HW/7mWyg\nIOYFzTb2qk6zE5FLeU3Y1j/Ac4ReNQc/C0tJDFE6w3NX61KP9FGYkG1A2WHz\ncLiMFk6pBbV0P7DdAiFOL26ietUYmAUjsFGOV3iiecsawLnRGTD/+TgAotgx\nFBYBFZtYFi2auyW2dVxmpRo7E2jRgRFa7ZpgxtTzvd5xr11sMo1uFKJgg9gi\nUhBf5LYBBZxEsLiy3edbTTCa47XtYUS52nh60rwtWiX7R/REv630gvmcbLgf\ngFcV1CWigJEV8c1ik+1TatgQ1KHr/WcnwO/XCV+twrfNQEkP/F0KYRQCs34R\nTff+HpGjusBI9luoKfJsTay7op/UDkOx7lKP/QDGMuDOCwJmbXG6b3tzDaEn\nPNbBF8LdTraFV3QCGzzECExlnSJsotyuZmdVRPl8Loip7EgIuQTREXeXhkYn\nfeuF\r\n=DCBe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICWalM3IPI+UtfFszxhfeeG+pK7+aoCZW3HAoBJOBlEcAiAGeV5zYqhuZWkF02pRuV9g4vMfywAVDT12EVRiXvWuNQ=="}],"size":44325,"noattachment":false,"key":"/jsx2mp-runtime/-/jsx2mp-runtime-0.4.13-0.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":"rax-publisher","email":"rax-public@alibaba-inc.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsx2mp-runtime_0.4.13-0_1590569739699_0.9053923700587256"},"_hasShrinkwrap":false,"publish_time":1590569739811,"_cnpm_publish_time":1590569739811,"dist-tags":{"beta":"0.4.26-2","latest":"0.4.25"}}