{"dist":{"shasum":"370c386e5bb35d59b6eb4e252ebbbfb5c96657f4","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.0.0-beta.1.tgz","fileCount":19,"integrity":"sha512-xR7ulP/zXomyKh1Ft+ae8RuYEB5SnAFgNArXW6mRDwQAmSwY7ATXaxuQWtGgsfWifR9esVwqL2LW3MKzGEn2Bw==","signatures":[{"sig":"MEYCIQDIjlUoQSP3//0MtpTfBdCmWznzILnBPr0hKUw5UWNO3wIhAIeoaJTiCRncRU9XQkGvSB7SKA+kXccypqsCBage6KLS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc64wOCRA9TVsSAnZWagAArTgP+QFXeAfepeSh9PTSttd2\ni2S/S+iz0PoSeyXaM/PVLmIGyhrvG34nl5i3UczSdWRo+3ob+al5qqe3HGIB\nKW5tTvIp1lgMX2VSzO19Tn+3y+LJUFq3Yjnlf+M6Bw1f7IRTVitIZrkuYabk\nNgWWXvbHbHrjvg8H83m0/hFQP5QB1wsf8guhCpS5XxlSuwUH2q3V0wylQQOs\n8H8IYjGbigY8A7yEW2B2KRpEXK2jxcw8rObw0PO0TKNb0L+ps56hbojiQbrl\n8N4lRojvT8yYhqz6PuMel07YL4bGBtuLyy8K0JL5dN/bSHrkxonQ8ya8Arqh\niayCPJaWXe2dsKFNzGJQ6SWCdxtErQCI4rntnZYAhfD0th17+V+TypqRAUmn\ns9VbWuIwaHZOTOdKLF8gFLLAKSya0Gmc82vPXGWrtAvbKcoFEgpNAyBLJv55\nrTIE1RlZnYWx4edAkrKcpBWUAup6th2HyPd2A6zrXGfow83z0p1BN5V+/zh3\no9uLRYOn0p4rcQcDkG9MlxQafj/Oat1GD3/UGTSgjOWzRr9Asgsv6h/gUxyi\nAckCk3NHpBtR/+v0azHt784YuSHZg4KtXI921kbXzS6d/1mbecZPt0VKxku0\nXw/IOXQXH6AwSL1Hac77RLldXH15WOp3bNkwS6M4wsrzS7eMX9ZOItuWuPY2\npmRa\r\n=arsr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","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","_npmUser":{"name":"zeroling","email":"wssgcg1213@qq.com"},"_npmVersion":"6.9.0","description":"Runtime for jsx2mp.","directories":{},"maintainers":[{"name":"zeroling","email":"wssgcg1213@qq.com"}],"_nodeVersion":"8.11.3","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/jsx2mp-runtime_0.0.0-beta.1_1558940686175_0.1635989198261807","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.0.0-beta.1","version":"0.0.0-beta.1"}