{"dist":{"shasum":"a517b936fe6938a1c15870fdfd2de3e4bf21efcf","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.4.12-0.tgz","fileCount":6,"integrity":"sha512-P2P+ALz6XGf3WMcQD1DziYGNV/KtTYWgapejDXC3CC7LQ7xhAqmNoDZUChDdxkhui4jHfQfkPnn08lpqYfnAhA==","signatures":[{"sig":"MEUCIQC0jT+eljZmO0sWS2DGkAZtmOXJJLPwUW+vyiItJFy78gIgZJ6HJ5ZqjjXU5NeBfvSNBuHbedj9Aq51y1jXTvkONMU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":199111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewkF7CRA9TVsSAnZWagAAboQP/ihHCUDYu/X5IrHYS0kn\nVYEpMbtwtZ9C2tp0kyyvr9TUwYygp9PCqFCcHlSTFvv4z7UILa2aol8o5Zx/\nrTQ5JGAjMz1duHHFpUDaOs+Ew8dX9l2QWRwnxfp5vbHs47JZlvdlMGvm50RS\nks6rci7R9OP3g9Lh9DgZBE8mBPvB8+2ts941DmASPk6n5kzI2ggmEee7RMFm\n1vce3B574Orh3zSIs9hkUFqA5gGN0t+hA/mky10vcv+J0R807ElReca3hS3T\nUAZk/iBLSphxJtYH7TmoESa3uU9KVUJRgj220curOOm976ZRxCmiCFZKyL9v\ngxJZqezDV6BnAa/Jxux5BDDbglHYLLl/3gqA8vQfkstsxElnjLA4+++0e6jH\nCvzmolXYm7cWyw33K97E7eIej+0I4hrigCCh79RcPiDQqe0BcHvAGtfCtHx0\nh/cE1cq3zr4tXGyOKx/+shneY1/U97EkX9O9QLHDqFJKjooDpo05RRa3aKtk\nMTckq8ln0giuL720ODer15jJ1xY79gUVWpRIjcXDAXET/V26gjB3oX/MHPcL\nlJPRGQLjeTHSto9ll+Y8esLDUBN1Hlosw0OfRSY4sEX3FpNhj0A/ZAKPa9em\nZttBmn0quCxJ7IbBgVAEKaxo2ryvwMWSFWJB5U36OM4xlDSFKpx3qmQphS0v\n25ao\r\n=iD6M\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":"rax-publisher","email":"rax-public@alibaba-inc.com"},"_npmVersion":"6.13.4","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","bytedance":"dist/jsx2mp-runtime.bytedance.esm.js"},"_nodeVersion":"12.5.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.12-0_1589789050757_0.9874762843952076","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.4.12-0","version":"0.4.12-0"}