{"dist":{"shasum":"ee7a0ef7c437ca0f0f2aace9298bed7880868dd7","tarball":"https://registry.npmjs.org/jsx2mp-runtime/-/jsx2mp-runtime-0.4.0-0.tgz","fileCount":4,"integrity":"sha512-rc0XkzhQNTgrni7Fi+62cjTmieaq6NrPibRZcMu2enVFtkWiBxtnH4W8kp9Rk8X+M6UeZsTTUQpF06pY3nbpYw==","signatures":[{"sig":"MEUCIQCqx6u9+r1r0vx46NvoVCXairKbFAprRTlRUwufcEZ2xgIgDapZYqBihxWwlzLZXVJhV115t6mosWpy7VvAIDLNQyM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSXxsCRA9TVsSAnZWagAAgY0P/RP7djCa9OjgFTra8Frx\nEzE2iGr6zPDtUh9akaE2GotRmW2Tqj3u9MO66AKNPHRPpUyjoZrYgP/smWzI\ndRjHSjCukpc3RSxWSV9reSFNEv9JQ5ZZjtU+lO+UlAaJQF9NoucoSwuqH3GD\nVr//wo6Hajt2dkA/6I8LpaOHK4hFgcZflIpMT8pLrEmwkQ/qQjxMoMlmz36r\nQFh82waa4QlDXnxiBiACiFrsthM2x89zPhU9isUKQfA6oHxJO3ApXDWMq/r6\n5pcFSbF/J/dNMKWhGWeue7dmIJLsTnK63NcRhQyyCh2IzlFcQ6LUXsiBZU1j\nsFjKsIOieuQajcFXQiQQkexq8EecHFcC36BTsj19Kd1PeJu4QCoL0v5SCIgR\ngfY/jlj70CZSwLQs/09xZZiCb0Q8d9puPrv9a7rQ8YsLTPtwU6Q4uLV4f+pm\nRyf5XCpHEeZTsSDZLrAwdoW/QYPMVoRoTqMS1M3zsjoSWXQsxCAkHX1O+TXR\n9a28RNcj2qZkxC1YBvrfNXGQmHe6DkDMhLvTEZlvjXg8/e4YBI0vfKuPOnl/\nMmyU2Semc58HWLIikIHpbS3ofLIjwmGt8b1ds29Z/CrpyWXmmagpDGwY9TDV\ns/QR+B3tBkYbW3eL6yoe5sHOQJlAczG6gI/EeDKK2wpVSCsxLKCO2E7ynstZ\nfLyl\r\n=iGrT\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":"solojiang","email":"feifeishen1996@gmail.com"},"_npmVersion":"6.10.3","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":"10.16.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-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.0-0_1581874283593_0.6620044987115179","host":"s3://npm-registry-packages"},"_id":"jsx2mp-runtime@0.4.0-0","version":"0.4.0-0"}