{"dist":{"shasum":"177e77c2995733e9ee4cc8ba9c6d5bdf6e5e2ab0","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.3.21-0.tgz","fileCount":4,"integrity":"sha512-NyEUb9YfbyRLnVEwBJjdWZGbjeQpAPmUas8D4gkE0CL2eULdboFBCcx9Hf1v+aakMg85x61vSF6yp1fBKVzavg==","signatures":[{"sig":"MEQCIAVTkmsPu96zodiFuKtgG1HDUOnvt6T6Ij5/gf9f0NKkAiAhtnQXs6AgyUsYl8ReLkEVGfZsWUiMkhHQxzfmbKs/2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFZWDCRA9TVsSAnZWagAA14EQAKMmdWbzZ4qnk/KiLU/W\nbiBAmh2W/+hC239sBIIlJ6ermN2wweWHgXq4p9Vqd2RsyXmYk1JMKlTCNdrh\nxolzSZynXgxMcKNNf02MuER3GwlWYv1lX/4fdr46PRRRMynRaaELXxUpmAok\nw5wAnAL+bR7ORVimY14owdaWesDkG1Ub+E0He450qNm3BMtw3w2Lm3cZpx4F\nnGMqqYzonTNSeb9127zY/jPIgZwigBKHZBXY7gze2+HDgntSUzJXpi0DvPJr\nV64quC10ajxdC+8AiUCkZEOlGcHrKXtvsX+Wc00cf4yIlKE8lHlGzxi3sPyM\nZP+8RJvCNOqUQNnEpXhsTiInMgr9Ud8LNF8hZKCw+4wfFShE3tP881kES/KX\nco1qrypHLeU9genAzoBT5dfUHYhYrbRV0rls+Cg8Y/65wY1SXX6jK4Hf31pC\nThnGtITY8yWDB0FCfnQxfW0gnK5Dvndd9vIRu8NjuRuazDJGQhZvFxhigxx+\nUtQ6hl9+0I22csGr0VBn9GzS0yq5orX4fsCL9ImRYqjOD/YcqDL+xCtVZ+Aj\njM5BoBgls9xyCmMQlL7bW7NQxQ1N/nGl8w57ln4TF9GmOjRtCEI6ayZ04JoY\nk7s1SmnCmcUHjFU4C8OzXTAWHN9tiaulNpiBLSNz/hCM/qSh7d4KLvIlBlBx\nqMgQ\r\n=T75e\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":"chriscindy","email":"yxy0919@foxmail.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"},"_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/preset-env":"^7.4.5","rollup-plugin-babel":"^4.3.2","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.3.21-0_1578472835568_0.7292912253377999","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.3.21-0","version":"0.3.21-0"}