{"dist":{"shasum":"b92efe867c908dff667f68f46084b29900826b9b","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.4.23-0.tgz","fileCount":7,"integrity":"sha512-ixqii2eij5hMigevh0HldM0grzh2E+7Iq8eoY1ahKlUgXM6SPSrzhRljoP2vnJUDiRR+o18sk/x6UZCqWKflMg==","signatures":[{"sig":"MEYCIQCuYdhbQLYj0ch7Mg3lMH0WhqIAflmGNMVS8d/qTRsxTwIhAJGPXn461YSxyU64Nd1f+IK32lJyKA/r3Q3BAUl9ry52","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":209914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6+kGCRA9TVsSAnZWagAAUz4P/1F0+tlv+fv7KGjIG2PZ\n/d8mEYpqKgm6Hp1c/YT/qcNtYKmBLNkjmlF6zP0vxxsjzD4q+s9k0awiQnEa\nDBM6SCrevSZEtmsx+Ythu11DD8M87leg0rmc9W/+5RMzY+ofJCFjUNWPm56U\nrJxuLQNmsbDaJCp420XpY6S7KoEWDJd5fuBdpKDc0WDeurP34DyjDxTpB4Dx\npvYufcEW/hEhaE/datPAaf9q00jYWNaxgmSl+dJetKvtBegO4498+BKtpcZZ\nBjwqJPtiE8e63Fgl7mAILPimVwogzfHMOA1KhG4QTXn27V2hTUJPTeljd2J1\nQ1y7QyShT2GYos79mry+/dL1MgU+TB1l0cKCZM1umqcpoBPXZSMDkMn9kVd5\ncZ7hKJZ9P+qqXHOgqL+C/bhqWPmomOU8spnj+7/S9phf7oZICepwOSM152bW\nZSMra4AvIleeV9tAvDog9S6WR8NtI203PLU+QQkf+w6197+z7vGDItjI2PXu\nOZZpdBMpAVTd5bfvys3LV5g4kE3BG2jQwWIMMDF5cs00CWka/woTltkKmtwo\ndHmLy9ufhDw5vElM9scj2I542evflZgxEOnd7pyFOfTeodNx+fhjPkwPxKuW\nnLXoj6oga5HyIGSY5APvrYBYQ4GLC5Z47ZQweoN0URbukYcI9xzqwVqgjKFj\nGyZk\r\n=VA5X\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":"7.10.0","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.23-0_1626073350153_0.5553903950499453","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.4.23-0","version":"0.4.23-0"}