{"dist":{"shasum":"2b5b54ea54f28d2304ab774dc49372f03a70e7d6","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.4.21-0.tgz","fileCount":6,"integrity":"sha512-IcZuOnHRnyYvHyC+pF37Au5FxWgDzokXLQdtdjm3zm4O2lurC4Ybvz277NoKZf5b22a4tDRk1hCmT9RFRG9bvg==","signatures":[{"sig":"MEYCIQDaXxTjOH+XLf7Yz6hw+t1iucxXvcGW7I/ae/n+4vb0+QIhANhZP8u4jsLQeyntuLGhpcXDXMjtsniCsI8MePDDmD8A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":208157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWwsxCRA9TVsSAnZWagAADIsQAJDPfe6WwdEbiiPADT+r\n+bwLPNy+RcIifDCqX7/cbz1wkHX6s9VrcqalD0+7a8ahyZjNhlVy2dJOBZoa\nreIj+ogvwPhSl+mpOXSMF0qexl8wMkj7vgBpD1Y5Hk1gQj4Sr+G0h9faudOB\nqYJrBO8WU6QP2voezYnDuX8PzyLEmC8Ybf5D9wjDJbRJl32gPAOqDXUxGCZv\n+dGDYCVbnQiLtkkIxq5iX5ZZPt8+7jPTpiQMCxpq/+kx4ykuiZLosIfAG0y6\nlkvgblCtvji/JaTu+YOKcJ5Kb8GwMzkbPXFQv1t1/+w9WEdO0KF2Tex1rY30\nZUL3iByddWrFGCbj5Nb+NSLvDM5caILe8m7zDLLAwhgY+7xX4EdIG2pxm/zt\nOlkRJlGmD9/sUecg0Y8yOTeBEHit81kU2PAyU5BhYCn5CGO+e1xU5TePlMDI\nOJ8o39quH5VyKmpXN6y+rF4bepnmeR3jgSbrLJfn97h1x87hiMTt5vPneqU7\nypdxmf3hGAjbLdQLIXl3xnZkKOZKNxmuau/gCYW8JnpKp/xZaxwuiyXfLp+o\neKlx525pr6xlknmx4K6b8LP+Okuqs2/ZSy/cKTdhrksUPutyLdjtL4OslFHW\n547TjKbmsm8cpZl9vgy7dc6uVMVRFCFRN0AY+lro8M+xfcsbGxi/V2MDV+UA\nK8CW\r\n=HLzh\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":"zeroling","email":"wssgcg1213@qq.com"},{"name":"likai757","email":"likai757@gmail.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chriscindy","email":"yxy0919@foxmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"miniprogram":".","_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.21-0_1616579377388_0.7525848268672726","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.4.21-0","version":"0.4.21-0"}