{"_id":"@redux-model/react","_rev":"63-5581db5c40d13d5ef02d5b57bf407447","name":"@redux-model/react","dist-tags":{"latest":"9.0.6","next":"9.1.0-alpha.1"},"versions":{"7.0.0-alpha.1":{"name":"@redux-model/react","version":"7.0.0-alpha.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"sh ../../scripts/link.sh","preinstall":"sh ../../scripts/link.sh","focuslink":"rm -rf src/core && ln -s $(dirname $PWD)/core src/core"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/clone":"^0.1.30","@types/react-redux":"^7.1.9","public-refactor":"^0.5.1","react-redux":"^7.2.0","redux":"^4.0.5","typescript":"^3.9.6"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"4750f4a2a0b0d24000167a0137c33d6b6cb59195","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-alpha.1","_nodeVersion":"10.13.0","_npmVersion":"lerna/3.22.1/node@v10.13.0+x64 (darwin)","dist":{"integrity":"sha512-oNdQGrtJfbJ3liZ42cmz/nIl0n6mYouHiSblO1ys6o2SbOAuy5Xs6Wg8TESAjdtZ5UB33ii3GnknKPo4VwlDRA==","shasum":"a7766712259a0bac1889dee480059fe432efae87","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-alpha.1.tgz","fileCount":83,"unpackedSize":116081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDVO2CRA9TVsSAnZWagAAdncP/2BfrSVuAGa1fN45W71R\nHHfnFVm6L9H8ZBCSr1d1/GLm4OTzdbbCu4oHJ5E9mnND1rW79AL7KYiTOBXb\nsRh41Ay7LLVEjJLWxEJjpd+q0SaeZmOXFTaDmcb8CNViDrtLoMwOv/eIVRlA\nSfgIElWvTwQyTl9AH2GmMVvUoh3Zse9o30lvRfavtvXlsP7252ZbAzr//3Ic\nztqm3LDJ2iTHMP3q11MnvuT2oiOX77OWSXytWUAniMg2/dExbOpVwI43ltys\nwwt0iTv/HRlUnpo9BIv6dcl7+3wFYF9Mfjuk++qur5RDC8ClC+dLLwRqry3X\nu7Q+fvXAYsrgWbCrlEngPYeJ1FeHYxKk41IpRYQLQ377lQRystzu9TW69yDI\nHxTSQS5LGo6Bz0KGzPkMiczM2fWg602M+Jk1gSFeDxFz1B84bk2r3k82O9Wd\nkWKye+YU77S+3Zw1r+krsrxh5H4FnWO9AoN7S/KfSYHqoo7e9jD3k/s7b4vM\ntRkMv7ZdZiUGJYzvbGF+HrNNTgP7Qex/FBNbZcVWkdmMIrXWcYq45AlliywL\nTTivKhX10OiWTfclf1qyNHJI+HFU3oF9kPRCTGwEBQlNxGXaKmBbP/UTiK8T\nTk+ROy7/AUHRkgpRnuO7MncBqPZ/xoLCd+8l/7/4QpCw1CYqlWw+0AlWn+/h\nBWtu\r\n=tVwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEX4appsvWJYHmBZSJyC8/3ln1fVnQD74KoK4tfbtK+QIhAPqRpUdKwFoFLNychdIQMEhJ+tl4r2Ur6Ukj36IXxcb8"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-alpha.1_1594708917866_0.12645635511223396"},"_hasShrinkwrap":false},"7.0.0-alpha.4":{"name":"@redux-model/react","version":"7.0.0-alpha.4","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"sh ../../scripts/link.sh","preinstall":"sh ../../scripts/link.sh","focuslink":"rm -rf src/core && ln -s $(dirname $PWD)/core src/core"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/clone":"^0.1.30","@types/react-redux":"^7.1.9","public-refactor":"^0.5.1","react-redux":"^7.2.0","redux":"^4.0.5","typescript":"^3.9.6"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"303872b4185926f62a091191196d70ba8267dec6","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n#### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n#### Taro 3.0+\n```bash\nnpm install @redux-model/taro redux react-redux\n```\nFor `taro@2`, install @redux-model/taro@6.9.2\n\n#### Vue 3.0+\n```bash\nnpm install @redux-model/vue redux\n```\nFor `vue@2`, install @redux-model/vue@6.9.2\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-alpha.4","_nodeVersion":"10.13.0","_npmVersion":"lerna/3.22.1/node@v10.13.0+x64 (darwin)","dist":{"integrity":"sha512-1bIlyufUk6jiD4ja7Xd6LPHGc3WhSByJSPZLgvNkJui6UXQVrGTtL4PxQ/JH24SYS4tKQN19gfyMEgK9addDjQ==","shasum":"55299386a9e05282c2f89c616b19bd5562ab9561","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-alpha.4.tgz","fileCount":83,"unpackedSize":116081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDVZoCRA9TVsSAnZWagAAupsP/iirEJhHA0XYMRNLsbJ2\ngUQwMRiO58tMfBe2KlU72bcYFm0+I1kMmwPXnabMC7QQjjJa/xTNrgaPELhX\nvIsHlMiT2E1COVVvBatI6oSR6ORSqXmyRDdFPgJwP+r9i39mXv4KFIsktjh7\nPqeasE2C5ppFHrp28joVMU+mgkp+soeiuerdmRz3rFWEu9aznwmi2n59HCMY\njAp82TAu0/tGMp7oNB78PhdBGkJfU+tO53FGZPhy+VE9q8hZOChM62Ckn04u\nbsBh1n1L2SzZbKyFfu1/gq03BO5+sEFtM+J7NL70h0P6jvw5225oZkZ8AjeM\n6+qNnNmRdp/+Js5JBxMD5hJmIwd4ih3++hjMH2qmOenXl9qFRsYxNqLEqmhO\nykzFvBGdm2JsMZ1IIJxq1sXUO8ZmWxVSu3fZYPz6EZrOJRBWvd6KVmneTmw1\nntdkvT6nqdLXfJwOM9sxCKvPFHVB+627utfOh+II+4Z75yI6zK1AqUg18Zoy\nC3coKMKgSwN+lohuwaLafQZvvx1NTSSyu53ovomnb+WSJvalC7BKsQbbUdxK\naT153la90L4LlfGw4NfCXpUMPLHIC2ANfpsu34ntiz1wePnqg4sRueHgblwL\n3b1E0IQA/MDuhVS/OWLzk+E226gN6x9PxAZOpiGcwxk7sfcBywV6H0y1fwnO\n8QK8\r\n=gp98\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEzc4HYJzx4nsk3PrxVG8wFWvciIdyBMJ1aGTHn01nqXAiAPga43u4mKetuJ9CS7xZv8h0C2YCb+tXjM6lu54hIHsA=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-alpha.4_1594709607697_0.13820821146246653"},"_hasShrinkwrap":false},"7.0.0-alpha.6":{"name":"@redux-model/react","version":"7.0.0-alpha.6","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn link","link":"sh ../../scripts/link.sh","forcelink":"rm -rf src/core && ln -s $(dirname $PWD)/core src/core","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/clone":"^0.1.30","@types/react-redux":"^7.1.9","public-refactor":"^0.5.1","react-redux":"^7.2.0","redux":"^4.0.5","typescript":"^3.9.6"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"322e687b0807e1be08ae630a1b8e81a22aa2148c","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n#### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n#### Taro 3.0+\n```bash\nnpm install @redux-model/taro redux react-redux\n```\nFor `taro@2`, install @redux-model/taro@6.9.2\n\n#### Vue 3.0+\n```bash\nnpm install @redux-model/vue redux\n```\nFor `vue@2`, install @redux-model/vue@6.9.2\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-alpha.6","_nodeVersion":"10.13.0","_npmVersion":"lerna/3.22.1/node@v10.13.0+x64 (darwin)","dist":{"integrity":"sha512-/fKl+JYbi9mY4q73R5Dt1iOTC3RDrH1fm7PMGZD6XZhzZ/uQoXahjeJLJFWsVoitfjYeYPgwwy6jU2fNVwZx4Q==","shasum":"c09a10fd3b3ed83480b8f611a5527986db503b74","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-alpha.6.tgz","fileCount":83,"unpackedSize":116124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDVsTCRA9TVsSAnZWagAAI9AP/03FTtMwqQrTdC4spEws\n7jR4YAVHj2ib4/xdMoWsF5Ucop1jegYHEl3B4bxKwrIQLDUvK/1CJseYgcBq\nVFoz5FUJiTiK3ghFU4PMlVYzXLqlYp5uo88/CBdN1MYMas2bJhSzIOe/mpZf\nWbSmIQPKvVof7dzDnWKMgV9fapOndlzNhBikIImVqTa5STgHXkIGnEyvDa9v\nFRYhrigcOil2hxzMP6H8GF3rjVyqWT/qq3WbzUn2Zoyeft7IyU1L1h3h/WLY\n54rolIANE2eOi3CcChuBd0Y6I1egtaXZyt54q/mOZQwdzmIWm3S9Pii+R6Jf\ntUNfHxAuMxjlrDDwDC/gEazHLcnEWpUiIMv0Wm3ppxKor98jr7oD3yquy6X8\nKqValMpDpMAPz5AQAm3ELP9AWMWMzqkPzkQIn7JoPQeHhf4/TTBapXymRN4H\nEHNQ9QoRKx7dIdicAdTlov47+j8mKsoumgwFWpa2kbEJaKOU/mDLzBaC5Al1\ng8g/3+zfP15lMybDPIbBp6SMfjBZjO+LSBdXONtFmAyH0m4ByjWdv2ctAXTn\nJvtagE0uOta7bLY7oWbD5/GuaqHhZI8+SHF2w2GPehVa1my4q7zrCXttd2ip\ncu77Lh3vFpjdJZ0k4hZEuFdVDdrKX49kwPYSFm1Wqejk108ojHl8lsModOGc\n5NIO\r\n=2D1f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAThkesTllS2ASNFR9UQ+FILq2TV0+fcgbZ6m47HZs/AiEAxQjDlMMnjsZEoWWXr2cDQBEjtrWUqy/duz5JCsRbDMI="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-alpha.6_1594710802905_0.5029421713649294"},"_hasShrinkwrap":false},"7.0.0-alpha.7":{"name":"@redux-model/react","version":"7.0.0-alpha.7","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react-redux":"^7.1.9","public-refactor":"^0.5.1","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1","typescript":"^3.9.6"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"0d6caae29a658853836180e3124d3b37dd382310","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n#### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n#### Taro 3.0+\n```bash\nnpm install @redux-model/taro redux react-redux\n```\nFor `taro@2`, install @redux-model/taro@6.9.2\n\n#### Vue 3.0+\n```bash\nnpm install @redux-model/vue redux\n```\nFor `vue@2`, install @redux-model/vue@6.9.2\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-alpha.7","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-X0P3d1F5lRhHxogcAjCrK3MZJTqpBfeX2Zw4s15GDbTeV6KcgHfKQ00tPkstz6k4tXoKrORNog470bGVxIJ39Q==","shasum":"56d41ebbc58de238f0503afba076959ea6e24846","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-alpha.7.tgz","fileCount":127,"unpackedSize":187641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDzaPCRA9TVsSAnZWagAAlAAP/2cHl1jNj95UMhnk38T5\n+4aPkmw5qMyk5N4ucMGs4Js6mWm0f8swf0GFyBFpcxsfNu1osk6BcOWAaZVh\n2qcdny03ljJRCoMekC29lGD18xArK++9RcMloIKYUAAiznWDUMyjHW8zGgIp\nnIjWNuFXGe8Uq36NFOwDfUh9WzQ8p0BQH9D7aocEmmO46MSb+2vExn/IsNf2\n/gmk0xRdIUH/A23g0JB/P7gUD215CCCo9P54TOZEaKsV4KcH5FIcbJmc8xpH\nO23E+09HeJM16YnCM0Lg1izF1kNFGF2GV3i3oEk1ysFcrl2g3PwPsLlacJQB\nQKo5rpCrLyaCEIfvHu+md6sXmdvSVT6dpPzGNeeazYiImQgmNOKgF3YMuVcN\nIA2k46l6h138uEnhF9YSh9vQNIqZ/ZvrREy3Swx+Gb9uG3pSmHg+oPPrLj2d\nUDln8Pueg9nY1+Z+zPeg0WC75dGZVfHRCZGVcgPvhrvsMHuKGN3vQFPNRNoD\nNWiMmP6zsBZjYQjaZVDHBMuEBO037eLJRvgiMpRv01DO+DHIOKD+zy2iBifS\njr3QUYu6cdJA5XH9rcKNlN/WDNFZH2pJHJRsISRariBSEpPW1KG+nC0WRzZP\nMmBtO7m7eH+vytOyokHQmBM4xVGZ9deFWDASn3oqIqayOMfMEUAYH402M6yk\nQcrf\r\n=WZ/x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKxpfiG6WZAkKJYTei6xeGXySjv9qnm6ANuUK7jo/qHAiA8QN0tKg6BK731Lf3r0PS740/4nCxyEdrpL0kg2le/rA=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-alpha.7_1594832527130_0.5748719803245033"},"_hasShrinkwrap":false},"7.0.0-beta.0":{"name":"@redux-model/react","version":"7.0.0-beta.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react-redux":"^7.1.9","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"4a4f8e5b07cd652da146a31a193eb69823f0394e","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Others\n* For `taro < 3`, install @redux-model/taro@6.9.2 instead\n* For `vue < 3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-QLhsa3FW8MLrAcnGga9o+1Hbf+M8XfyzJeQtNIS1eJMjMT9F016zthXFdi8m87CDGBhZrxqZlEnjHpkV3xOqbw==","shasum":"37c07a9cc0f9c56608427e1974f8e0e0126c2936","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.0.tgz","fileCount":83,"unpackedSize":117634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD89SCRA9TVsSAnZWagAA9aIP/RzgYEDwhPHUiE11K4O/\nw7U7WPCP2XyPt2VXq+sMT1e/hua81HlhXqKuLnFbpQxiLtrtmcp4Ao2a/B5R\nX94scmfXwQYIkV2TdaxZsv7XV5T8T0KPNINiYuzBfNSdFnPFSPZmHtT3hlk6\n5IUnZIBLs1a6wzoMKQ6FJHBrD2GiRpdDRKWHl7eFFgvzteKJ1XK82A6S2LyX\ny/Er2xHlXLMAsA84cNYaf6a63IVaB75uPyQtiXgQKsf0MM5sqMW45uHJ3/L6\nJwNtJcq46pG6S6RW7Ge8dI2uyTUtTi7xP1NNPac5TYwExF+7QP5Ll3zNHa0K\npI1oCPOlp2MxevzULY9MMEHHvxcWUmd3JofkpO3nRHjtG4DOYtQLVam3BcVV\nj/OeNJ+4nthbQ0Nkoqbk6Ysy1NWWE8kAPAxSHTCMRyc4XQF5FgS83Z8YB96+\n5tSE0ZwbONXCStjp3E9n6vTBqx2acTqfD9cJ68BdOCUWKodzTp92msmhn8jj\n2T5EXoAgIyGBO38Cr7z9X1bfzhFxbnDjLx5Irh0bHwCwqoSqNzVc2+YMKkd+\nY6/VFmqdY/GXdgt1IAS1BQlySoVgbTtLgfRN1sIZsCWxbB1GBQASFl9GD+kL\npg24yaZC/GZWzFD23rkU0rjiBBRoE1RShOmTfhh0rGLTK4Ug6mVcn8daOyMy\nPIvF\r\n=GhPa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSW5on8UjpXKfvfqFi97yiYb+B1RpQ1uISrQk8C0kzXAIgfUVpXIeWP1OTyPs/qiVxeXntlDZ1ciOSNC7+BXTvMAQ="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.0_1594871634225_0.3447265856575439"},"_hasShrinkwrap":false},"7.0.0-beta.2":{"name":"@redux-model/react","version":"7.0.0-beta.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react-redux":"^7.1.9","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"b842f1adb2cecfebf7055733ce7315d8410825f7","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Others\n* For `taro < 3`, install @redux-model/taro@6.9.2 instead\n* For `vue < 3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-8iXG/yHLmLrLdv6qzjp45QoCbhKWUeWiOKGOH74AwAGwreHncFVee4ggPWwzJaPlrx8y51Jj2+pfUiVt86fxvw==","shasum":"b6dee4e34e55080bea65ad0e70d737644022b2c9","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.2.tgz","fileCount":83,"unpackedSize":117649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfECt6CRA9TVsSAnZWagAAGBkP/RcoJpCYhvnSjBm+56yh\norsAgKWUYMSw0LbsqRGWMMqWI+Xfba3xVjl6KJabAq+bjEs2zW8NIgMdhFVl\nMUWlEPx4ZFn1cIMku+EAMzUY96+3yQ/onuyVsIAHN4pbqkJukAGg6Dh6T4dq\nmsPVvAPuNECfktC/c3P0jwuMDedOKZxMwjSBsIMCDZcARrC1VGHroNwa9QrG\nT+WhFE88W2qtmjxAOUPeBG3wHvd6dNEaUTZodLaN50KKooJQH0RopWPVLKO/\nY4NeR3j7r91hi6QsRj/HJWOCepwjDZGwSkqdE/jb2OXjJPkMgApzf7fHqICC\n4Hfo9+DymYfti9yP2G6y+cokQNabsBPx5kqkGRnHx4ssIIvzT2ETuNg8hD7G\n/IVwJfaE4LUvy65zXY8EKWM8VJr4KDB/Av+jRsiXnN0Z3j61IqijgWwQzGpV\nu3STvy9RxIdWdGUJdFJ+d6Z8LEfNtjaa8nl2Td1b6YPFvYoM1ebXGAjn5BzA\nXXwFTFT17CK2nLl2LeabGwDo9pEDtXl3cLb19lJ+On2/lQMulUIGYOV1TKpr\nofmuMUMAlBuq0kb//5L5k+4M+S0qOcyMyhvSTpw+lj/Zb+x9lYW1oUQJTNsI\nsHOTWMId8bD5DKfggnxe1YLZEYpXgNUOP4hhag7GvTkKXZHxkwYWbs3qQ1M+\nyyMH\r\n=0HFU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICOGMck/FPZqCH9dMDqnY60ap0S3BdaZUkDG7+XC/snHAiEAud3ZLCIfaNf9lrgOeb1aoBDwT3Y8GaWfAl7Vs/qTEds="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.2_1594895226557_0.5208407737386396"},"_hasShrinkwrap":false},"7.0.0-beta.3":{"name":"@redux-model/react","version":"7.0.0-beta.3","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react-redux":"^7.1.9","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"49f81302616ce29aaf53ade32d310e7fc9bef0c4","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Others\n* For `taro < 3`, install @redux-model/taro@6.9.2 instead\n* For `vue < 3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.3","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-+n9Go7uD0ZMbayPOiJHN/wA4tW37gHz9Kc3qG8fjeA8xOEL8ck1kJpxWf00YF1DjJE0nq3A/eKT7yuqI0D7Nzw==","shasum":"c9603c295648e3ab0db238daaa4e66109bdd95a4","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.3.tgz","fileCount":83,"unpackedSize":117768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEDL/CRA9TVsSAnZWagAAuScP+gMJYQ44KZDk8TpF6Ig6\nrJc1iz5eVFVvyanc0Af/pZrMtsoSWnYko5mOUeDDfmM+TDrgrO7ItUaOCsUw\nAtfg67VZu2HiKVoV/6+VPkSToJN86NeGKYfI8wWkJo571dCQNF/j7lC3aVNZ\nmRagTheJt9/H/GdtIShB1QBSM6rc+J5mklfVLI7sGLIIkKfF/Edqj9XMzVaF\nuc2kG0HVpyMxYARogusIsEH6EeGI/uFO2e5miZD5vnPUMfr7jB3CrU+04iQB\nvJzqiN6OMjLIZn9jTARuaCN02V7LFbW97o687CIIFUP6+gVvuePg3NsrF+aG\n2Yae9i67Nc15zvOQmWIEP553pQGy3oGOu6Lb/Los3aJREHrTthhb/v+MgU/J\nAbAf3njChdh41sfmXAPRH2l5Cu6OzPiaDW5mTQwHQ3BweD1PeMXytYA6vV2J\nvTQ6ORPrl4mKKJrlYKVqsyMq0xAArJVirekkIAT9bEWxGoBRVgh4MGoqNAWw\ny7TBhOLJ/kxMfC56+TRUhAGI6G/hyoSo+4AT7CFrD4/rX2JIewOZsovD8Rup\nyprrjs21XCislYlotG3olOh+KGQnSIlohAW0G4mBkU8uePf1D3FOnDMS18xL\nE1r/shzvyr013ibAfwN3rbxrI4O0hK9hGsgeIftIBtIkhig9SEudftQMFr8A\n9FwF\r\n=6G+D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3kWJaVn2zJ7U2Sb+Qf1ZUPeqLiEOcdRhKJtZ1PVDyXAIhALcZWmaQbtnwyXkp3/Q72XpCiaiYmvhBWO3GS/8x4FdD"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.3_1594897151254_0.8016469991822415"},"_hasShrinkwrap":false},"7.0.0-beta.4":{"name":"@redux-model/react","version":"7.0.0-beta.4","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"5c53e08e6b1b9208ed81210d373da11fbc7c7a0d","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Others\n* For `taro < 3`, install @redux-model/taro@6.9.2 instead\n* For `vue < 3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.4","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-71ctMa8/0n9ptM1nhNZjWsB+LhHgnrOg36PQVjv1CybxtTnUnnLtrDFWYUjs6fgXTGywgKwzDWUOqSKaY7YTjw==","shasum":"6a8592b133dd3cd47740afb37491b794a31d5422","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.4.tgz","fileCount":83,"unpackedSize":118199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEEzdCRA9TVsSAnZWagAAk+gP/02OJiaVxfKbUcgZtM3T\nPPdOaeSwwY1tHwuJoPVLr9XIDXcE85OmCfetYAfjVU3nyZ4+0DFdSWCMbpQ4\nlRD6iElr0i86RB7kHOYhk/R5OShvj21aG/ZrAK64Eq2Y5t5a891Lf1w+3QBo\nsjqVqtoowRsKrCtSFNLRiqyW44vK5m7IsSUpZYziPSGT+O9kWjnJQYdzYuMz\n51nEFv+dDzDYqIsAmf5H6aJ0rV01DiJGz3Nlpxot8/F2YEQyOM/vDv8H5exm\nACmdquiHpJGYtFabCJxF00bnlsDTp7JFhXmY5yhlIx+OpsrYUrpkjMn6kKL0\nzVmgzIF7UUZxmop18JnhrKzw0qMn1peavoG2jEYyQCAe93T8n6WzlKRV4xIt\nfnoi43r7vFnd5lwXCnODiSSp4GAnqz2/O/o0tht+m43La7o5FJb/D3NDiUQz\nNBFEhKPEVQeHu3yw4Vxl88FppxIzkoBHNhOCYsQ3ZLQVZQjJlH3ELMZpFarP\nb1BgT0UhX0b4qzpzZCGQw8Rw6Vs7+DlU8/oiS2D+5LsL4QE/g5k2uOhln8Or\nx9rmSmXSNPGrGy+hUYquu/n3Wq452g11+5HyPxQE3Og6hy4v2cXrD8M0E2Td\njYLbd/FSYTUyvwrFRCI9Iv05W4WokKABMJZJqt2gZfMj19Xg6hZfT9QTgQEj\nheyY\r\n=b9ie\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRDnV3hciPmUq8ZxN7Nhm3qaw4d4xMK6exJ2UA7G2x7AIhAP4+4Hwn2njhicuJEOheAF5yls9XCoAQMIpohXiRo+Bp"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.4_1594903773002_0.5595260377350648"},"_hasShrinkwrap":false},"7.0.0-beta.6":{"name":"@redux-model/react","version":"7.0.0-beta.6","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"c717831e0e85f186407ae413b432dfed1fd7838a","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Others\n* For `taro < 3`, install @redux-model/taro@6.9.2 instead\n* For `vue < 3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.6","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-kwp+g3ERw22IPNmQR7NV4sVvwx0zh5JCWvuI28pP1LA1PXWHCtqzkCAJP/SH81gukWlv+zt5fkXVe3LIcUk3Ag==","shasum":"fe70c04037a31f445f161dc2bfc40081347a7f8f","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.6.tgz","fileCount":83,"unpackedSize":118262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEGj9CRA9TVsSAnZWagAAAu4P/0ZTkRMtSKmNnbE86oTj\n54ECSdaOBiiRUUlu+YBanBMTwM4etNuZ9Hi75zRdKbbfhxqU8AC1bXxzBZkG\nVYnPrg+fp4pezjnRlgb5VcWfmfhkzSJeNUocAonzAX2jkkcKyM8SQB+DjE9s\niFhvdu1GVAHRNYZ4vAFOpP7reuxoi8P79DBUpznmbHpKT4QM/R7zOauU8P8v\ndgAWplV7ajxsWFyqJI57CNmCRNNujO1m9F8xaJacgQqF9RShWeaxjHyB6M+U\nlB0lGSH2vgg6YHsHCm25XfIs8g7PxHE4xj+8aeJXmrsFExdSJrflvhqzTV9m\nmunl04qGHyLfWsV+oGfYaWEVJuPCANMKBfhqEb37FzGZ378l2KKh76az9jB+\nFwl10axANMh0j6XyLVnp8VW+Aw/mnVvECDO8BpPVNjVtQ5G+GDCf1qEOD+jy\n1m4JShLA6aVqUV4tpvY7sXi8nQvEi1VlzrfLHC3QEE2MOJLAZvKo1mfnK1jj\njMk3rTDoy2s4W+LGbHs95qisFmy8wEN19NYBuoRhigXssA9Bv1HiGizzMzda\niykN0D2vDUV9973sF+9cCBkDNiIqEPI0Y1pHLGycA5HQXBxM8Wg2fip4xnzi\njTnqwOziz8tYO4xxPkij3deE5D6ah/HrRo3649tNQbwgYz8tDud04WgdDVVz\nv52i\r\n=t6GG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3HPV36WrGRMH7nI8VOj87mdOP2a5MbcPXsj3dfXGCGgIhANXoC+I8OF7GlJu6Gr1F/gAcyXkHJlHigu14IsIaPHyA"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.6_1594910972937_0.0941507466667384"},"_hasShrinkwrap":false},"7.0.0-beta.7":{"name":"@redux-model/react","version":"7.0.0-beta.7","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"3247b73af8947bc69c6f306e55893cb465d14d5b","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Others\n* For `taro < 3`, install @redux-model/taro@6.9.2 instead\n* For `vue < 3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Redux connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# With Vue\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading ? 'Waiting...' : `You clicked ${counter} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  name: 'HelloWorld',\n  methods: {\n    increase() {\n      testModel.increase();\n      testModel.getUser(3);\n    },\n  },\n  computed: {\n    counter() {\n      return testModel.data.counter;\n    },\n    loading() {\n        return testModel.getUser.loading;\n    },\n  },\n};\n</script>\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.7","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-bpyZTa0CqG1iJ2yf2VNRm1vlsyC5o1s7H+PpJxrXelUxiK5rsxB6bt0KzTU84FYxie+Ei5tkH+tBkzfa2gYc5g==","shasum":"5964ee0927b2ebf542feaf860ac8556d228e0150","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.7.tgz","fileCount":83,"unpackedSize":118415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEHxcCRA9TVsSAnZWagAA56sP+QFsU9MuPlvHT4xKjWs+\n+UJNG/EzhBP16yBWDHdth+izWl1H0CRC4jCEGScPx5qNC+aXQjX0qiAdS+d1\nUyAryxOacgd1ORXzMOmasNzJIejOK6kAJVvI8g/guHfsaSg59mGgxGLGdOO4\nJiXWiIu7b/+BhgRWCNa2VKI1J5cvqo3V/AqA26+sWBQ/1ZU703RXPkl3jbql\nyXnaR8QCMvEuqV6rdAFwyjDeldourVX5B/+QDbHR4aTBDpYMfqOUKfSI+A/4\nlvvVj3qB5v/6jJ9hcLA3p2P8FyMDJMyc4+rjs27/5s4tc9um4Lpd7/JuPKX2\nCmGBYEz4VO/tKeb9KDiypRRtRCjPjMzzzh/i9NnxXSHKMrrdwDz3uCMsW6uT\ntBpVdw+j3W6qPVeU+/SrT6ofrOsdlzNZZzcFKSQ2etivqYBEpV6z9JTtz8V9\njv86gakhfKeDDS7Y5+YNXI6mN1hd7pXyzDXfiajqj02DklmK4tmzAwJEnXvj\nYfdthYHY4cl1bnJts/UCxWfF4F+pzn8MnBHjJyzjqUEYSudgq+CfOA+vMR5h\n27pSMJF8rhuxi3xt+6ZPruCrbEfpG6vzsDanOIod6bDnLLRi1j/zESj1nTix\nXLLyF/k6iaT7KqYJrWslBevdynsQQ5ZepUmsfUW0J8/6MJdNTcAQ2vIsx6jZ\nKbOs\r\n=aD0u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0BBwcI8ijNDZyA7KpeqQyqr0Y4WoVOGMrhWVKN+McEAIgakDIPJtkW9xaXbUklsVnyHhiMmcLMaZQ2BNlVxp3hTw="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.7_1594915932527_0.5825636074036169"},"_hasShrinkwrap":false},"7.0.0-beta.9":{"name":"@redux-model/react","version":"7.0.0-beta.9","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"libs/index.js","types":"libs/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","prebuild":"yarn run link","link":"sh ../../scripts/link.sh","forcelink":"sh ../../scripts/forcelink.sh","clean":"rm -rf ./build","outdated":"yarn outdated"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"525a8fd13577b2c9463ba6fb9b88ba10a5ef4f6f","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.9","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-2cdxroWjRj3JAzGb0ic3FCQjIe769sGMottd7fjgm9sm2VWQ1Y2dbgmpjsXVRLEhfiJA31XFHW/CEHw4lGMnhw==","shasum":"5391a7cfb8dbaa3bac32d7689724f55e861f273d","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.9.tgz","fileCount":83,"unpackedSize":118288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEbXVCRA9TVsSAnZWagAACEcQAIjI09gizVpDOhZgfCa7\nJ8ZkHKbTg1NHCreTlzGOEHORTyGJEZ+BdCeljsFnOwF9zeU6laMdOyJbBigC\nSrp5dKU9c1HjAvsLmxdbbbOk0jhtKM0UGFgswDW/s6jFA+bUXCUyx6peEe0I\nXCGZ4kEPIJut3c/71+P3wWcO8wEND7u0K0w349CMV/g4F4fb07w9scXDeEsW\nLARq63soOxJWogj0qf9POjAfoKsB+4f4lGsoPDcJY9/WDT6HUjK3QxEVgh8F\nOGbXKrcESD/r//R+grhwE4EMmZ8uvUaEzi0k2H+LNLEDerpu4oTjAKOgt8iS\nOSSx18I5NHH5cDJ7XX+ntoFZc0WUX4mwOzsmWK/Umqz+UERkujyPXBtQGfUf\nT1WsAO7f+HbVcm5k1NWHSQp6UxNfcnLwCqg8PU6UZmYiuDEm/LDLN7eL7KYP\n5a7to4TKSIit6+tDvLmf2lY0sSqZWcaOFJXh7XE5oHGu22jGdLlguGDWc1Zg\ncHkqonf5CIdoUVIJ7CtEsdnsp8gaWy3hWsS9tUVYC/UIY76uNiGUH8uzWcD1\n689mG2/sU3t464frNfS6bdh2z5vfvsxDkVGIuRDoZf+1XU1TIhTQa0UPQwiN\nQQSSmIXEAlf8Ji/NJuBTQ69PJBGuu3ffyyXiUsuSd0VvkOzKCJlGXbEEn3gu\nN/9E\r\n=dXTT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFmAinqrUro0NR7HH906PkEnmaKXbiRrwd0QQKbYE8oAiEAmVfEp2xFbg2kTUlz+nqVKJD22Pq3UzUpzJP/b0Az3r0="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.9_1594996181484_0.0900850063529719"},"_hasShrinkwrap":false},"7.0.0-beta.10":{"name":"@redux-model/react","version":"7.0.0-beta.10","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","outdated":"yarn outdated","tsc":"../../node_modules/.bin/tsc"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0-beta.10","axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"3064a85b8fb698b2bcae88262410a1ae4a4e3776","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.10","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-xQSoZqawp7aNgtAgwD2+jCBY23As1w+C4h0+AtdaS5904pUCNXGosPyopj/d+NkVC5dSVbXiLJZ+FaPDUWarVQ==","shasum":"9efe057e3f3390faf6b9fa9f2fd5ff9f5c84ee56","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.10.tgz","fileCount":21,"unpackedSize":27094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEleJCRA9TVsSAnZWagAAf3sP/Rj5kLFI8SxHxC9MPZUf\nkF6COHwc1Mq/AkEYuF5i6cQ7nOy+phLcOY1mLUxKMLnXN+WYUvuAmdAuOjbR\nLGuo1cS7W9N7OVuFF419U5bD/OlbYT4zYVDOmZIvHpbsaMP/1fbkqEuFY0E9\nWU1f7boS91oZC2h4h4RXzIKrYylrPG+A5T36auMXBEnCuL+Sz4L3F35Y3szG\nOMfQBlx/TdynExY1rSqD4kxL2rj9Ejc6qzAyM9s9YAb7ES0/itv0BgAuExlH\nATwuktH5sRuC2CJNF+DIDC4ldJ4nIAENFEJhEZl2VdOJxrjrEJOHyYaNfxKk\n+8tu6CazyQuTFM4edd3HKp0gHTx3YK9hwYpCnDhOVEM5wyPv6ikUF5TmurUj\ncy37jjgBvZ6sQTcxkERMQTlzK4IX9VUyOJZ6EA5R8kpROIE9X+JjFZzA2jm7\n0P+DyMBhh88aj/izNG5AvRGhg/1QAIR+yV1TZ4U5t3SYHOlQ7gtOGSazscqC\n5+bkUWWRB03IefzhGs3T45Xdjil1PXTi77T68kiasapxPhNygIlAHUf5oOvh\nE15EEAs+Dyi0bMkqXnfIIhaPEA/JxJoG/pRVV2tr0yaU2Kwtpkbu9eJGkvED\ndkju471EyQdBY46iinfK2U+S1WHifgB3sTsuHPojT1DRqXD8n1mxETaTJLtE\nsISY\r\n=spl4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQiVfVo8mnLx94sWTw4TWjwPCzI69mNWY9OH7RVjP2eAiEA9Z1JGOKvkQ6y+A/IcCZ57NHuwXfWVXpkXFJZjZwL/M8="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.10_1595037576635_0.7878008630562177"},"_hasShrinkwrap":false},"7.0.0-beta.11":{"name":"@redux-model/react","version":"7.0.0-beta.11","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","outdated":"yarn outdated","tsc":"../../node_modules/.bin/tsc","relink":"sh ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0-beta.11","axios":"0.19.2","clone":"2.1.2","immer":"7.0.5","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"c2247c0ca9ab995ecdc20ea8e78b2af66503513c","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.11","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-3uwGUcpSoOfSvOkom4FKxYgags7aSEv683psABMe4SvRZxovVvnWxSoDtMTqv9ow5tNoUE+OfLcyHzOpqppm8A==","shasum":"4414d72f3368164232cb52720692ac4c7456085d","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.11.tgz","fileCount":21,"unpackedSize":27138,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEl+pCRA9TVsSAnZWagAAiFQP/jaKJUHU+1kAO4rh1P5P\nToTJAPES8GfjRSWhJnuFDZ9kHZJdxm/25NL6Xt9xsdwI2DQlFJOuh5wObGYY\nF1HcWpd1b9T58pFHWtPxM2r4PYAWQzdI91LisUePG4sHm03mShyrEIfNoQeG\nw405WajUMPWgrfSjHeZDCkX+gkj6JnJQwKvHoS9s/R+ekqq6Lp0rMcE5OKpz\nU/tLNKcvpslv+d0j0SEci0IYXC4nWGV04ygyxVPUKsB555XjS5yFfnUywnkO\n4Qxf7GkGn3DxeuMOi8fKSozZTVSOFEM9DSiEKfoGKcryAx4VzXSF8myHgF6m\nJin2o4Txop7/o/kzaXV4GPziIuAZLrmTlEk6Y/zU4P3Enq9MEZtV7yGQDErt\nzlibGN7vKPd1e2+r7uRvvTKfVfoqEY2APJ6ol45PUiElV0jRBrvgzIvOxOfC\n016PJ1q3HMfnkz+1Nc8vVcNLHv9iUErBOAkOW5c11itM3Cknp7vMzHbKEOq1\n65Bj3DQaLRLO56wp7R7wXEKL5qUnH0a+UJc1zIuJ8AohvhRH0aAqC9wxsLsg\nbKB+59J7z1HHZ/qeJLmCb/3k/zaIjpeP35dDyU0qoBitEDfBOQpKTovHG36E\nhP2X2YDpOKV1mqW8W2OSdvUyuRYyeSz8AHiw7jGULwBPjuWX3d3Am6FRg9k3\nDDLQ\r\n=TfaL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdx6SLsX7DCumu+Dlm/W2RvDpMkUwSHiGw0bp2fgxU4QIgDdY5hp/IB5h7psdU69hYsTpUqiHnTfNPECLADeRUg3Y="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.11_1595039657432_0.7235092401755061"},"_hasShrinkwrap":false},"7.0.0-beta.12":{"name":"@redux-model/react","version":"7.0.0-beta.12","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","outdated":"yarn outdated","tsc":"../../node_modules/.bin/tsc","relink":"sh ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.0.0-beta.11","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"483e3f2dc50915a54cba1185cf57313e112a3374","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.12","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-PR8x3lCH96unKT1tpel+XQELBzTdYEpMbmbKhSuFnRol2SeEcDxZWo55M2VC5YoqEA/CfGdjSc39z1tvNa3wbA==","shasum":"f0628bc716dbc781174da2260e494015e622eeb2","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.12.tgz","fileCount":21,"unpackedSize":27093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEmICCRA9TVsSAnZWagAAZDAP/07IR4kCjugzIS7eeIh1\ndhSsl7GrIiTB01Y44jkaC6JNdVW8N/WSv7ZvMMWX1pXqRg8m0qNrpeHOht3G\nAt8vtRgwb8vEazdC3XFOpB2EVrsxW9XfVXXRWIbZO3dIGNQ7UcxVowjQtuch\ndAcI4+Zvjo3xkwndFObhCpwacnPZ+pGwPBPFyJasPf0lVATikHghy9JzL5z+\nK2dlX66XURRc3P5rtp/d3s2RTWAeMyQw9rlYMJW2JZMDkX8YleA6TENgRY4E\nSPb2xAK30sOxMhpQG+Xm1u+VcgJaH3r7kVqCmLBXfRoso86FdOxspLAQkaH9\nIQTcWeH2GMOIYl1o6RFRiaiF/D66D3GsvTbpFsaQhvPLXB4gaJ3jS1hFn0Hm\nLcOf8Gjt8Lq4q8l310BVqUJQmfyNFH7n9Sdm3/QVd1iMkSktKjgN3TgUAm76\naHhg11DChNoZJG4gxWCKEzIQJezAR0pWjT1V/fMmDXCLiPAQrn2hunQy3xaH\nl3aHHDlHBfaxT+gGykRpMYMy+H+KMIcApZNYHeLLKTCNz1xmBnZVgt8nuw8F\neTUEFAbdkuV5rlCe/eLmCtw2450uRT4nSgd9A2QpCy5cyIyWc7cOHs+2Govb\nfHQcOHWZ1KP3GnWJZTKWgOQbdGtOwNS7+zz6kFcKt/xVV3jP1rBzGkfNRxs1\nC1es\r\n=YJ/U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICdykPVD4XhGCV3suJQMcWeCsM2OBXyWy0zN/nU/S1eUAiEA6j8SxBKImlqJNmMHjMfB1Z4f8oaOT6xsyb5MFDdbF0Q="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.12_1595040257810_0.15330822217688134"},"_hasShrinkwrap":false},"7.0.0-beta.13":{"name":"@redux-model/react","version":"7.0.0-beta.13","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0-beta.13","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"4e57d7d5e466ca2567d9d8f5d40059b1b23b9224","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.13","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-a+v2bAX1ZRz3wvpITJeCUqBPnih+N0Wiwwj5xG88o0QTTpp9RSYbdmNPRuPPwszmVga2+E4929O+QUn8Ejku1A==","shasum":"d92fa6f70e2645ec43f365968ba2edf10ac896e1","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.13.tgz","fileCount":21,"unpackedSize":27171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEwx4CRA9TVsSAnZWagAAAs4P/jCMRIqUnwgq6n3ys5Ih\nFIp7ASJtBc4vUXOZQNC3j5u/vmUqIBy7sWBfBz2lFPR7dRBwj9ReKbD5dXID\nepzU1MXPfgFTUl+P0XE55oy8+o/6FWnVr889E2u7tC+Qk9p98axRJ4jOH30/\nlmVEyntcyDP8fTCdOPPUuSyJiCGQcp9wpfLk2gs+a8w/QazxxOD+oIegQ3/R\nmFI7cHiZpq40LskYBvYPpkpV1iJmeK3Cr6ymMHOApdWUtnX5DR3IV+Zx2u2I\nouhasDL+nIjkEa2VIKDyRI2npTskq9uhD2FQIG6hchlvRnprfcJt8P2cY/C7\n4H724EmO/CFRC8EC/9IvY2hA72HhAi8V0RlQWBvaXAJjev0YDBIorjeVYCRC\nVrsX7AXfv71IseoZFK/DV6c9vUwx69DMIXn+FoHIc7IZBwLCLM+tO6DpqNfz\niE9b93yoJhc8MrYT0SIDmAVWIaT3eSapMAfxv4EnSjhwEBWauM/zdn36j3RS\nlLDWN5tNzY6SG/5HezQdadTwqzDIAOhnp5QuArGsWzn1UpF+AkjHH8sTi0Fw\nXxL9mcBZgrUTc7gbwxBTkUkMJp24h/W1xoym/bh7zxRQFmx6Esr6YUVYZYJo\nGpx52xf+z93A0hPjScHJZuXzxIl28IjJPdUgFPOihhb61Oe35YSNppBJ9Tqn\nKNs+\r\n=5hbb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhNnZ0/Yw+5WePczhXlma6HOTq1Ku5G4ocOezyrgM95AiBa8RuPiwa/Wgt5g2QCeTyJG3Vx5V98a7zemNBfi7sExA=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.13_1595083895617_0.5398001618225883"},"_hasShrinkwrap":false},"7.0.0-beta.14":{"name":"@redux-model/react","version":"7.0.0-beta.14","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0-beta.14","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"824cc9e7c45b3db6d59da0759e361493e844611c","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-beta.14","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-DSfCyuPio85CCbGE8X2YdYJ+0HEg+Nt7A1XDH16ZhBX2Dwb781M39fxAa7Wj0aa+/oea7r+v4NxJ7VxuUEV4CQ==","shasum":"ac94725ed4c8977d58ec82a115f22f4e3ef22447","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-beta.14.tgz","fileCount":21,"unpackedSize":25849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFCHxCRA9TVsSAnZWagAAUEAP/jKW6U0/fvyBAUHWgieA\n8NQ08m5yDtsFm3OJR9V6imZYs994SVH1+g/AGXPBoKNZud0KbTwXg3KdR+5Y\nQx/IzAwkVfV1dJXZ/9TiwJHMZFG8oZzaYJgBwmQg4bz5UFhKF91F7vEmbfm9\nOjQ6XLv31mcFPpRpveCGVZ4dhPhgaI++OlD96vVZ2YEwbRuXpjEO1SqTm2XO\nEI/M4k1vV1oVSFrVaCaluxMQbMS6SAwrjXfIieTAuEmt/RRI1hY+ejyby7PP\nH+BbUMKflN3PpueULoTpefCWG97ohC7L6IsuGjaoN3vdJYMz2fNdtCUhcwBj\nYg9qHT9V8qDR2AbHHrp7OaibrNrE8TobVT3DPhLSU80EKkOGmbRlZ5MBeH6T\n1jc/1mSwJc8URzd81RUKY9duHtA5qXitnmVFkaDldSem6w6PyDrZzGSXaDuz\na4A8Kk6T5H30attumrgqLUwEg13UHHatG0tTb+ASg7pzxt9wBodceTV1+1Sy\nO2espbcQoNvHO20zX9tPboNdisVxCV2orOqT+t0lTAI4mM5JKrIndYJXd/sd\nbIGCS0Zjd0gpxnouKzMnXkS0Kv9TYD32PJdN75auWOaZIe8rhjj+P/T1d2VZ\ngKBXZrUAdvdEe7mhlHRL4bKhCpxj+E8VF07Ea7hrOujg5zh5uFG1N9exKc7A\nnIkV\r\n=v/6K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErD4GgXQHQsL+Dz6zdMqnb5KVX8tdDxZhxIzQvp04A7AiAK2mN2efV5wz/qu7cEFtj/7B5DrYJoAPYhykbXr76Nhw=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-beta.14_1595154928681_0.5695968464893779"},"_hasShrinkwrap":false},"7.0.0-rc.0":{"name":"@redux-model/react","version":"7.0.0-rc.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0-rc.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"53d0feae1f63bd6b0eed2cce9f624c061507ef81","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-rc.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-wJj6sW5zxWePpf21H5q/e9OEjhhftrZsAJ0lGqku7TWi4gS5k7v7+keHnhrvtq6hBiFfgwGa6W5v8cloK5mTgQ==","shasum":"8534c5af73c453212f4cbb6480b848914bc99eb5","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-rc.0.tgz","fileCount":21,"unpackedSize":26336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFFPKCRA9TVsSAnZWagAAWp4P/3+ne8r/rS7+D1OuAPcZ\nCCcWjG1fw4nx7BY3FdW48E0Q82aaVIX97nwnTdRZ2JV8KY33H0uarGy+sT33\nirLKdchtBMqj8AIaD2VE4IuLWuYKe0pCtJe91vVuRpUAZkN6EdlRCfHX0oGP\nJckHGBquA7Wxk3dpAEwmqKldRRUCtvquQOz9mXxBttXV69WZuJD9v45MoDOC\nnPNUhVAYmqa2jP4GCk1KttdhPn2Fm+W2gOZ2+DDmXqA6x7M2cuyShn79zCDY\n3hy6PgUGCGNHQuVCNnb68TbVA5xA4dmCmnph7y0rFNTaJbXFTdRGxeHYnqmj\n0uoEK6J6VH0ocAvxc7d9tSGepPyyTHVeTuHfUQHw/G+/HbjxP95w2e7yDHSJ\nccVVcBYHtu3JBhMyn9JIL9ywR9maLmf4RKe2S3mZA7/y/lXBEDE+ALe/f/2c\newN2Zxppg9+gPHVf3xJgzzcYpZtCRnj7DzZFUQ/xOVcAYX86+0JpBKqH1xYP\nTjASUKob+bDBzf4i4981UTWk8hP8Ut2bbeSX5A5/MRv+8+LPFB3+gVBuMnNr\nsqlY0dF/MpDZPs17YQWNJaW0IWP4RiJJzDPBca1Z04lzzOHhzHppsqxek1KH\noLqsaQLufS4aWeF/oDNcLMBoXhmJY9CxK2aFUIP6CmuFPIejO/Wk2uaC+Dfv\nyI5k\r\n=0G/O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClcyp5rvIzRxMskjNf5MjTdZCqN8ka/doJ7om2QpB/WgIgNtRxiN3oj9eyRMuywmvB2t2JpxDUrxx/qWuK4ZwbZ8A="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-rc.0_1595167690236_0.22480503443091382"},"_hasShrinkwrap":false},"7.0.0-rc.1":{"name":"@redux-model/react","version":"7.0.0-rc.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0-rc.1","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"d7f45bfdea72fe5921e038fa3c480b92d5bb41b4","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\nRedux Model is created to enhance original redux framework, which has complex development flow and lots of template fragments.\n\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# Features\n\n* Less code and higher efficiency\n* Modify reducer by MVVM\n* Absolutely 100% static type checking with typescript\n* Trace loading status for each request action\n* Support react/vue hooks\n\n# Installation\n\n### React or React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### Others\n* For `taro < v3`, install @redux-model/taro@6.9.2 instead\n* For `vue < v3`, install @redux-model/vue@6.9.2 instead\n\n# Define Model\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# With React Hooks\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# With Vue Hooks\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# With Redux Connect\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# Demos\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# Documents\n\nHere is the [document](https://redux-model.github.io/redux-model)\n\n---------------------\n\nFeel free to use it and welcome to send PR to me.\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0-rc.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-tvREzX1pHNeNIaCL6T8XRH2EyW15rGE65iSErjP6wRv+m1S3oj+2B0doOt4iqXjWfbbE7Nx7b56FXv5J/VacIw==","shasum":"5de4136ec42b0b84ffc621e3979e668089e0b08e","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0-rc.1.tgz","fileCount":21,"unpackedSize":26336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFHcWCRA9TVsSAnZWagAAA7sP/3Vdlyu0jmEiyho4VgWQ\nO3nI45JHnAGdn9/6dbVKAybWB6Qbd0RDTLNzIY8ltwWUahmASEgBf8E1L5K0\nCkL4AsyqB9j2DmxrDPe1HHWKH2Ki1ROFEVPgDjZIYXwyI83LGc5l9NNqmEGr\nlFqk4R79+M7gSjxTivCAFayZovMEPZTQZMu/G+I670VR4HJo9cW4VQsZj8bM\nnKisXJWXnKiH6fmML/VE0H5VTEfYFOIo+xS+uOoLxdgcq8nw6hI+ZKam4+Pt\n31kQpuAQeOS5iCTmpN05FAzyHJZo8lCqhM3cNjD7Lq4JJ8R/vh2/JhVfdkK3\ne1+pMVv/jsJkaExJDQhgCffJYqA9QI4LVV0ZI9jlCTqKkmZW+7ZFcZj+M4hY\nn7CwMMk1gSvkqpGwVK32CGaJ9vCLD6T4dRgkiINqeYsv2hsb4WiVGpRWWv1e\ndAYoJHLsmIPpzgJGRuHSSxbGL5s3ZnuV/venn6aLFAZVZDIHKNBx/fV7zvVa\nr901QguxWMBWYt02bQ+ae0CXCMvehuz51/amhskYVb0IHOCzYlFcaHbgJgOx\nWRHULyQCUg7XBhji6PzyMJeIMKdEszZpJ+KuzFcsQb2LLJjS1nVHhxMKdxp7\nSXdTxueNwTq0mLZ4/oA+rQfj5EknVi5RiEe3fZXp+V56+dDo/QoATqix7LPh\nKNDH\r\n=lHTn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Z+EinUYHr/1bp/ynpFHiswvnGNqMOu+pGGFr315MYQIgR/a3gq/3vR5mVS3TA2EYdD8UfI5BvoXP1MNN0KPgOJs="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0-rc.1_1595176725769_0.8561481570656744"},"_hasShrinkwrap":false},"7.0.0":{"name":"@redux-model/react","version":"7.0.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"b7454cdbfdb128ea00aafb659d7fd712d4aa281d","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-JiFwGrt1Dro6UMe1k2leKrBSNHHygBm+IiQYCvqS0mfVyZzxvx5ZCUX7O4XGxOnP9e6AR/YFSWYV1vp9PKYvrA==","shasum":"84ca22aec5652a7c13e5d2cfe54e7229fe4325d5","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.0.tgz","fileCount":22,"unpackedSize":29694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFPxBCRA9TVsSAnZWagAAUlAP/3h9KHYUOeP7IpeWftQk\nCxr5TFwAl55vrjrZvrL9HPIolbhsUsZst1JFn+USq8+HCLnEbIGPFvMrCJtp\nwuJOzRcgZjjN0O320HDZpIL36UGtTCZMjA+z/ugZU+AU5R+bwFVrLIlJaLQs\neTyOwDCbe701T12sNT+q6+GHWg/UJFWakE5pCpEcEGzWmorOy5uTIKJmAlMY\n49EPxlurFsKWH067LEaN/EnFFXhNOlTSVToNkBOrrXabPerRJIc35796x33d\nr/Q1h2lObS5aWvgqjXTJBN3miF1GMbcVLclf9Ra2YzHko8Yz5+QVhl0+NpSI\nvI3T8E5ZWxFgZvdLqqVtqJU30Lp0sj6Jgs6KF6Vs7RpKT4s4U7C9om+5VYwJ\nOH0AaJTB+ROUuckXGUxy3626T+afOHg34UpvqI8hiCByqjVdqx10sciMomaF\nCUWSA242n122TxpaJGrhLmg9IxVoPfYORVkaMiw3k1xyM3mnW9vnSPN2eVOd\nSFWD/pIKoGaxDsxI79bPhF9R4BZ+Mopz5vcjAQ+WrmaRaBnObY4MYzq+9N+G\nQpT8O9gH66L+c2QkfYV7J2Zr1izvCsTDzOfpoBe7I8u1Ei4vj8lrFC4oGitG\nTsqf3u/V5KW4RFrZSlwuaGumx0d+ILVBnj0VReFNY42VQIdQ7aaiTrOKV4f5\nNkd2\r\n=y7a9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhcNx1HOR9hC+Rc8jdHgMcGiWcqv5OhGCpG9jGAGFizAiA9DzTLf4mIWpcetTUuVwAKn4l7qeSsCcYAo+Iwj3s92w=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.0_1595210817331_0.3933388063684353"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"7.0.1-alpha.0":{"name":"@redux-model/react","version":"7.0.1-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.1-alpha.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"548d90f08f1fcc31e55558052fc490ddff94b6fa","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux Model的存在是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 代码量极简，超高开发效率\n* 使用mvvm更改reducer，一步到位\n* **基于typescript定制，拥有100%无死角的业务代码类型提示**\n* 每个请求的action都自带loading状态记录\n* 支持 Hooks\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.1-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-tBxdjKkGX8nKXjEAdKJEH7Wueq14jZEU9bNNs09K6YmdQIMCRUKlA5fleDz5vJ6um2h5pxMY4nTOJrk8hRcf5A==","shasum":"e80047daa49db1694fca5fc31187e046c18ee250","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.1-alpha.0.tgz","fileCount":22,"unpackedSize":29959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHjyiCRA9TVsSAnZWagAAnBQP/RikWjeh7t1LtEFmn8kv\nOVxNfV4Aid08hWEYiuFKLDVsf6ogF+wqPAghI+cgpjRZ9yNkyUSU/5IdvpXr\nwc6jOdW3M4Dfv0+7g8Gsetxzm2uIP9IKyBuxBB/93m8Yu+5qdWLqtD5wx4WZ\nbbd8bpJrQFkRa4jRpz2/rL+2+GuKVXjVor3sx8NFm3sSPxC1VU4RaiAO+r4w\nmj+Q49JxAB+TUfB4SRz8xG0u0y1qD5hZQDo6scSmaGm58GCZlPUtxzaloDKr\nTlylBA05nNEOW1Y3b5HoOGce6nJXWAldmdfLIbc8bP7xcjgLnLjBMJUCWrKQ\nEJ8+k5IWADTR+Lo4s2K5XsH6yq9qAANf7XW457d16yO2nxZtbtWYHwOovvF8\nPnx1UBk0s4JydxoMJuR4kIJESJ1biWavS60ZpStAKO8/c+l4gYhtnWr3Kt1e\ntYOtF6Zr09vWDJTGd8SnxDTLrHnN82w9IbNZn14HofZdwNRNMjZUMtnkOcC4\nXDvvouMtVA3V8E1VZAborbKVEe+ogSSgIo4wQ5AwvsupVIakmGcgnYev68xH\ncQYmTMd7sv9gbuylaFJsc2RH0Prnbdob2Fo6sfw8O031pSV7+D8XanXFFuEj\n0zrtZDD8nQrhFp4f/rcfjAo35xBY5VbEQ4kf5x3bKzq5LPgA7N7WGumQh1H+\nobeb\r\n=wIET\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwYhWAMZDnprs4k1qj395NCTPD9V9cMlNcRYBWjpX2owIhAIbaiC0Zqe24OSQvugnAN0lGqYnDL1h4i/rHKdRqVzZ4"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.1-alpha.0_1595817121689_0.7788950437340865"},"_hasShrinkwrap":false},"7.0.1":{"name":"@redux-model/react","version":"7.0.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.0.1","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"606d7c142dfd7717c847b0aeaa60e76e477764b5","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.0.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-ao5OWudcKdZKN0XtO2i6EjY62lz4vjIPayUSqRRT7BDtt20K3/HW4KMvRfuF4oe1GzBMU880+b3P9UI3N++q6w==","shasum":"a1cd6edd135099a243ac3b4d6fac1ac772019449","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.0.1.tgz","fileCount":22,"unpackedSize":30359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHkKQCRA9TVsSAnZWagAAhqIP+wR5Q+nBV/5olczlqHCR\n4O4/nZ6ezL2yTwXp1H3/zgKa2UJYZx9iC4te482Fd8ZuBmMnXL2R/zv0aG2G\ndOZ0G5SeFaYrBNqs86NatQhwrwds8YnYePF2P0Rfb2H/+46rhJVOLoAXqAzl\nqj3HsRMoUXtuPJylXepBszOPYVLQ43olULzaPI59MGOcp8Ayug2v9gj5CkjA\nzk2vbcUELam7ZasKZGOzAYwiVwpqFC4C1zd4kE9CotQW1mr+4TQI4i7F5aWT\n02onVXCcbAN6fS+GDCmfeg+CqR2yKhaB0lf6idv+cm0vUnPRO+HTbTk+O/Mz\n1LvSQ3ZvErEG90AsmcI7sedwbvi8gPQlbhsDNpWTiB+u9ntvuOG1GdSc/6eo\nQOeWFsa2OAptlLDzt/OlXOh8YoAUP2uIs4rACS8SKHNsC1IGzZ1tfbpQMxrJ\nVIpveczI7nf84Lvw0AN0uwQH52fgpcgeZNKf/Tl6FRzC5m7o/LNf34qDpj13\n+c4tkCO7bMb/iI+l8K2Wld+mufsCdt0WvYdpBo5tZIp8pepiSLw/x/4HNgUo\nGvNfaDuhJmIAh9myHJjeYTS8eNar4OoeUlPkwYrOuaWIU6EcRqOGjgV5red7\nx28sGyVkEMgkHjjNm93rlLCwfjRMAdAkRjNjKqQ85GL1m63c/cMN39yCvHWo\nVe3k\r\n=xcJ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFttyVZSE3VrEB56P+MIfikJnT2YEamru5KqaedOM4FUAiBB97HJIyPG2ghOIJElHTDbU/wenfHFhhU8IWwPkpjbWQ=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.0.1_1595818640009_0.566635013074607"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"7.1.0":{"name":"@redux-model/react","version":"7.1.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"^7.1.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"07dc213467b9e4c05b18b6d4bdcd11f02be628a4","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.1.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-5upI+6PcR6exwZMjstwiwQKSPZ0Xsh8SCA7oqrB08zcYv8UN9QRmQrpPR37AYCKoTHZb5qjaudB9Q/ZwlrJ/2w==","shasum":"633a19a34cb65bcb6502db77222f59520ac9e5bf","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.1.0.tgz","fileCount":22,"unpackedSize":32057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIRSvCRA9TVsSAnZWagAAjJEP/37CpbSZc2Ho2XmSvjS2\naPbCc+UafdvL4Xo4LmGpYwHuYpl5s4O4quvn+r+SUI8rIeK0KellmlZTBE5Q\nVhxCsno3v1IAd84SdznRjxurhRqDlnNJ/PNK4iQNo8Wfk5UF3HdL78U1tmFh\nxC0bfaTaSSVpPxPYR9ZjiDUwHYszfEJZKQmLzYq+/VTnJmdc/rAVD+TjKpTy\nC5zlJXapeR5OdRmQKLHn85Ivi7KYIiED9QrI1xsUsBZWXNkY36PK5SxJKK4E\nqZJboxdJ+SYI7zuVS0mCQiqUkjbEHshGyskjYCHa1x2sGi7iVyTVa5+wjRXm\nB/rOS+Ukvi73tCdta1CKEZT+BHyILcTuEaWRGN27Jxwhmf9hH4qaRbXmzipM\nSefQ8xZx4kQ/rYOQnysHE6AqNVoo3mLNFZEMTsdFubp8z66aebMmOcXYDmoG\nh9YyE9RQID1EjZXdLuGo2UMhSSUy2pk6/ypRhd/BPwmvVtd4m+l0qh+V4acw\nBDMOpXkop0E8AZ7TNPZpmRttW9iFCyzVpoO9U5ncDiQHPe7A9vFQcQmLdSLN\nHeT6hlAyAdAp/1QhW1De8RcSBIl9ocrGNMHZxYd/jj2hWmIt6RmwttO9GwYR\niCJZJAB+AK4WY7UAZwxhPVgFE12NrP57nDasWhK2624YkvAiydosy7lTgSEo\ngbzA\r\n=oAMy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHt7QEc2lUhr/RPSiIE/FNXtZt9l3eJ0MWcxJd7ZCrlFAiEArppGsWlX717K81Qz+n+lBqMmdD6ZEecT4K5zRbX0a5U="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.1.0_1596003502824_0.9120352053784018"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"7.1.1-alpha.0":{"name":"@redux-model/react","version":"7.1.1-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.1.1-alpha.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"38ceb1f67bb451ccba8c032e017c0f95f3cda3c4","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n    id: number;\n    name: string;\n}\n\ninterface Data {\n    counter: number;\n    users: Partial<{\n        [key: string]: Response;\n    }>;\n}\n\nclass TestModel extends Model<Data> {\n    increase = this.action((state) => {\n        state.counter += 1;\n    });\n\n    getUser = $api.action((id: number) => {\n        return this\n            .get<Response>(`/api/user/${id}`)\n            .onSuccess((state, action) => {\n                state.counter += 1;\n                state.users[id] = action.response;\n            });\n    });\n\n    protected initReducer(): Data {\n        return {\n            counter: 0,\n            users: {},\n        };\n    }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    const increase = () => {\n        testModel.increase();\n        testModel.getUser(3);\n    };\n\n    return (\n        <button onClick={increase}>\n            {loading ? 'Waiting...' : `You clicked ${counter} times`}\n        </button>\n    );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n    setup() {\n        const increase = () => {\n            testModel.increase();\n            testModel.getUser(3);\n        };\n\n        const counter = testModel.useData((data) => data.counter);\n        const loading = testModel.getUser.useLoading();\n\n        return {\n            increase,\n            counter,\n            loading,\n        };\n    }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n    increase() {\n        testModel.increase();\n        testModel.getUser(3);\n    }\n\n    render() {\n        const { loading, counter } = this.props;\n        return (\n            <button onClick={this.increase}>\n                {loading ? 'Waiting...' : `You clicked ${counter} times`}\n            </button>\n        );\n    }\n}\n\nconst mapStateToProps = () => {\n    return {\n        counter: testModel.data.counter,\n        loading: testModel.getUser.loading,\n    };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.1.1-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-Li0RQJb44m7DK9CKrYatVDAJ6Np3ch/W8gN1094RmGUC6cZtWfdTK8y4QX8j6g8/15ASbgSoiYwMnykkv/BLqw==","shasum":"e328d30215c2a807f242a3479c324bbe4ddf148b","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.1.1-alpha.0.tgz","fileCount":22,"unpackedSize":31551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI7euCRA9TVsSAnZWagAAYfMP/0+21xtJEPkuAkH58krZ\nGJmdtF0ZzQ/BB0li4hSp7JUKRKdp43QQwhNb/WRd7tOyF0Wx5pHR0aRkQSte\nleTltuCes6aXxPmMxOKnbNdlYvplNrX8lLlL3fyGBqazEMp8yQu4r8eWIhsT\nIMdhjJaFOl3BOojlQoAkU02/0b2caH9/LXQX+Dwv64glm52ZB7cJjU3Iugl+\nEqBXm72QgJKWQfL/PQyOt8QvhLlUmdPj6jRcMJNhUSBdMTjn6/l08dOANDQy\n6CdWaJev1qmLrpfq1pa5zlLgzazWlhFBaPgjU21RJTY+/VZRRoof3SGipxPT\nztkpfp1WuRoQgmCtmIt7Yw6LQXqXhh8DTwPP15hS907KwzQcOU/uBESLcXf7\nD5AvnymngFpJ+JS42bONwAdsD2u1QeWIuS7cAyp2hi2DL+tRuvg8kWVDeVpE\n/yMrgFj0GX+fztwEMTTOXoBqYN76WcAwiP+Mfo/DDp8JHE7hjtlfMZ7KUKWc\nJnlq2NmjJ99O3yKJU1zicIYG1Yb41JzeSAZ2SKoqRS3uqmrlje40DcOB5TdO\nMoZh6UsExHf5Pw6rLu5Mp6ejLtRoobz8VUqtz1c+xqDQT6UbdsfI8/h704f+\nRKkWKwRh6Bhg6V6zx4dEJ0jdpmNa0Ho8aqvYrVtsR6Zj14m8KcKgUTV3G1L0\naOMP\r\n=pl8i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwW7VCDkUCrIYmfWUUieXofPEYNJAn51mQOPDocGtuYQIhALLDtrTD+n5Ps5sySDjMQov2QPFUMU2eUNgQ6qjiS94x"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.1.1-alpha.0_1596176302395_0.5608541948035572"},"_hasShrinkwrap":false},"7.2.0-alpha.0":{"name":"@redux-model/react","version":"7.2.0-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.2.0-alpha.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"5bdba5ee3d56c9dd2db90a57d243f149a9cd7636","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initReducer(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.2.0-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-X+az4Dz8beE4gVPm1L/D1QN5E+g/40sMlszLWbafFqOGU7AXT8j7hIbA0YQ7hHCMfnGwcbjsfdqEywUtgrzUCA==","shasum":"c9c74b21854f199c379e94fcd53a51b6404815b8","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.2.0-alpha.0.tgz","fileCount":22,"unpackedSize":31415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJ3FJCRA9TVsSAnZWagAAO6UP/Rch7qaO3mdc9OPHCus5\nIa9z0QckxHoDSK5t6pBh6NsgazLS8TPO3SrlPJxb067SYl6JJhQLJmZNI035\nDczxGnTPU97p0wKprN+ecQDGu6UT/0GolnGZeM4WedEP7p61suhyFknXYYUX\ncMN1R619XBMwrT5kW7+wp49DPE8v15sHssxQpRU4+F/WYqIi/FpqPqWb2DmH\nU1ZEcSQ2whp3fUDf5dpN5uIAIna+DdBtK1rVHkrO9EDXIBURaA8AHONqVM7V\nMo6Q3oqIaftxjlUB32cp3EdlNClkg3L8xMsYK15a3Khk7OkQLokIAIKNFtNp\naBMZioLaNC2eXbIKcITnqlo7ccPgYJfGeQNxDPN1dGQlxTwBaDzq4h1VDFQt\n+jVOCKklL04OQ66AMJpXQcUEknwq6m7Szsiq6luEi7584EgSpWcEufUZuTv5\nZGg1ffTEBQ0DXdQIza3AwblT+k6iZvmrpSNXs4PwMJvP2w+tWI96/bG2bnD1\nxiKzc2f1YEDiC8+dAXlPYFqELxN6BdXnYrp0/YMJR5tSPJFDNUXd3YgwPwWV\n6w+2lIp2/FLtcAp2vjnTAVV8RP/b8g72EXiJCjt8CNJy0TH8N7ykGOyEpwNC\n4GmwtjIRryOnj/bp6RMerrzyhYuoJmrcy9QnK7X14ctFmnfkwsS+ANmrfaHG\nxx+e\r\n=0SB4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCARD89oJPBhGBDcmKx2vRXbw+nSTUYxHdyaGGi7AW0sgIhAMQ1BLNIStkFgKIhhRDttfpE06IUawzrcDd7EJdmqMNq"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.2.0-alpha.0_1596420425020_0.3630394225195799"},"_hasShrinkwrap":false},"7.2.0":{"name":"@redux-model/react","version":"7.2.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.2.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"2186dee4cf041788e4549be4d8fc3a14da6a8daf","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.2.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-q0Fst8bBdeQ61OBsz6IdAyFInkKavAGXem58YNx1WAQyc2XFRMZMGHHdWtSOUQMTHEJvIDqRODnnPJDnmGs12A==","shasum":"ebcc46c69a2c1445976e34131a2b658b47af4e96","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.2.0.tgz","fileCount":22,"unpackedSize":31767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKAOiCRA9TVsSAnZWagAAgMsP+we2N16DRll07yTQhxLB\n0aHustqF9iBGnVeNl2pEYdiIw4Isnur9BEBiZwnZqZH5PrpxgiZsmRgQyazt\n3UPqmnnUIiFhCyZ6vBDsjMRffAHbHTpU0/tUppcnhiNg+k9bOSTXsbnPyAL3\nrMEE6SnbhWOUfk1TmOAH/n3v3iPIPf3Eu56USB+CKMucuUmnaC7BWA9F2Fip\nH84lkWWocH4hLyyzIArhDIrGEe9NSzHz9EORemUrBu5CBH8bAYfgBO2xkZbI\n5b/pNi3i7BmlhG6llyXlAX8sL8HQXKPDWkue06rcS3J5iZyxosAuBxqlGaQu\nsYFQt4bLomOfT9pUiaUU7hP1fSKlxGQi1cMAvOH5dWIfKNV4XcISGOj+NbOE\n/WOxhcrdkJvV5sU84EU+luuUN7yVc8re00ryR2IdwfnCWRMS6Y/xoS720kwC\n8J3ygHPyOq+rj/hkgfOAWFmh8a7BesgdfYRztOtBRygcHU85qCxovbV+yhln\neKrPrc8nYqZ3FFeI+PzMCKta4KJ9e5R2/L4dMdUMOF7t81o/O3jZ1DVDNjIB\n9I36xfyyWWyDctpOB0tRadpmDSCn3bQk7F32NlhldWeedgPKfMaIqUms5ySf\n7Go7YZ/xYxfzdeEPbDMrvb1IyKUbq0qDzyVkmQVM0mcAr7/WFVXrrK5sXyqd\nyY6Z\r\n=Bjsm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIFMgUZKYGJ/qYR98uwDOGnVPDpkSIN3WHcjbUr0KsUQIhALUe1C4JcqgwZsbM6tXi/6998bJ+klQQ2FW8br9AGShv"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.2.0_1596457890517_0.5708683031642254"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"7.2.1":{"name":"@redux-model/react","version":"7.2.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.2.1","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"82481530922b2c3e74f1be2664b87115ee49de5d","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.2.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-xq4qmLEl3Zs7bWOLUyDO/Zid3D/pt2ElFIOSOGyfkcH36Uz6NVUSaZLkDhSTTb9uYiAinpjWjwybR/Sm83zhWw==","shasum":"41adeeaa15a9566f4abaf8363c3ce2175f066c63","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.2.1.tgz","fileCount":22,"unpackedSize":32090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKhKpCRA9TVsSAnZWagAAI2MQAIVAzmqhVCQcUfX6vF2U\nW7T0iPY2LexYBLWAgi99EOWs78fSkILRAUk0VL9UUbxLBGzMZsiIhBpXEP35\nr305/aZx1Xp2SbPVznk9oQh7G9rQUeZB1i09z6XNBBMgR0w8V/iqw8g5Uxr6\nmpNrlxTA9RkcAKhhNalnyGUQ3MC/2VNLamuLvBmMEk2HOJjMeKvZClZ2jmzR\n+gT6MDSGvuOUjAjhs7paWCUgcZPChdLGLyd5peD4wfzdM4gau8jW8rffNGb4\n9CcuV9/Fjl0+oHkWPHilPiay5hK1l8tO6VR5dPXE6qBnM69BbfURgPRDmeD2\nrK2JHkyalSmzu4AnKspvMR1IbJe4YjM9XIDTx3305y06Jg3sbgG5kbu3EKuH\ng30sfP40YK07Md2K3iMy5LT2kQEOCh4+T0lGKGvjWCVgzPWZNDUJE9DpUJEb\n/jsO1eEoXaO/PWaL8xAW2witAxsaTqamEwkUxRqVmO/v0xFAjMdJa5bk7mkX\nEKdhbrbVNSUptxn73L0bvXfJDe6FvYC5iri0T0eNDVeobU+4aHgB2v5ockr3\ngj6sjXwh1GNfz58XmnmbnXAusOINlA3hL9x1Qqn+3u0eqxdPh+gZB7fnv9Y4\nPkxUL8Kg8PbGp9Xn2bR/1C8mpbQ+R9K6mtelkog81bkRuQp9NOSJER9qtYWd\nuI9O\r\n=BENa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWRB+XMKSliclMQ4/37wDSLtIsnViaOAfmPtJ/GfXy2QIhAMSvomatc4XMKpOqH3c79SEkzDNx7Mwi+RVCajAwBV8X"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.2.1_1596592808924_0.8907067949381375"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"7.3.0":{"name":"@redux-model/react","version":"7.3.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.3.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"2a3fce2db29cb7e48bc5c89f4559da07cf56e3d5","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.3.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-DhMTaHxZTBRpPTey35qfk3XBfoiZGRlgMlk41tHBpNFRyif1R9qHzgUD+tyaPnFACPUHgqFek1P6YN/b/NbCVA==","shasum":"6af2758709b147fee032df2afe3a5ae3e9dfb77a","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.3.0.tgz","fileCount":22,"unpackedSize":32452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKkQpCRA9TVsSAnZWagAAXSQP/iM0RbXDZ9/OTV2PwV0B\nfTY4E0wrwADs73QsikDZ+TLWNWrPpBOmesTgCRaui3MTqdSYTfO6mbZq0WrO\neM1gPU6jXcrHhJALveterl6vi0QtxKL2LPVBhW3K9IIhZAyNjBrV7IToswaG\nPEHYoep99dFmV/IOsnmtiD0wBNLuP11SjSuUdUzEjb5p2Pwq7qOJLh1fdJXq\nllk2KhC7zHo6cuJBWOAbzaMLdXeMg9jYo1nK+IoS6S+dhoIvTTmJ+LKf8OCL\nLZqyc4qbqeKJTMPRZwIUTECYveVqxUIbNUD7XsP/CZ7JRiAxDhXL5R038GT3\nYGizY2/dcX8c154+0fhRX249qPvv8GSIqDdW7yhaOjWePRJNgcnFXCB6gGcD\nC2nTQj4ujr7WSjGQ/6KwSjM67L1nPvK810o6pRV+4QzjdUus2EuY3lZkUrn8\nw8uuo34AyNtbpPTWH8T4VPyvORsK3jIt2kwB6uHz6r2xXDBzTbWeGmdXgDEn\n20t0jWHQrcIzW6X5ubf22rcqiCFZ5suPulefMwb9BGjf/OKU9t6fvvqD7SKg\n7/sWQWk8AFs7NqjdylQ3kbTBVhvZQdry7J+42mpmn2stmchpjR32YtADHpg2\nkMsDwRsZLIk05eikl9fdhXGOKtgpGE+H3+y6f5qiWq/HHWIK2RK8Uww+0SWm\nOlhy\r\n=WtEQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID5/fenbsKLkoun4cRc74jndfXBUTWJJNey3ixmJhIhoAiEAqoXbuOHcYPYuR6xCEwVGWn2fji1QhWt0a4Z2UKBEAnc="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.3.0_1596605481060_0.46340889018241493"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"7.3.1-alpha.0":{"name":"@redux-model/react","version":"7.3.1-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"7.3.1-alpha.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"c6c9f1e6e0f6473df428823964f13683d0613ef9","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initReducer(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@7.3.1-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-WdiX2XCAQI8umob+yTcmvbxNe7HeVQfljNvhiGZ8gCG4Pfuksz3bWP5DLvSvuMClw03zCwTt44F866sL8lf6bw==","shasum":"c704d2a353a0345952769bbceefb67748ccb099e","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-7.3.1-alpha.0.tgz","fileCount":22,"unpackedSize":32453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMLnXCRA9TVsSAnZWagAAB94P/2lbtgcbuWM3d1dM5rtd\nQFoJ8dLmXZlH+bzjbO8f1CwTMfI+rHP89ZLycQ7eHC5JwZFofWoyS4T1A4UM\n6qBSQ6xPgjvm1hGEEz0OLusrHmfIs2vaDTgcEqeEXg4RR4fnukIhlYFsQHn0\n29y+K0wAj9kww85m4w37stF1oN6/s5/zPHqL96joAkx3XaLChJBSCPzGkI05\nYg/SDziokKoBzon+k21tT1JubQRce3gqx8surfTwnW2XUrqWGl3b/cCF1dLn\nVQJC74sHJ77LXeBKUzs+GSsmvXRAtRFnaJa0NFmtZXpGiubAsh92WpOKpv/M\nltf7V4e5smFurwAwBvww1i9rwgWXNUZcP2KjV1XpdTo88+LquF3YFAen2lBt\n9nteZ1NNsP63k7eWLVA6ZUctWxfI84CZrefjseR7T0x9r4cAywNI8vRaUZyR\nmjM9L58QKMUmmyU82JNg6DM4UCpMHYAwdaY8pf7/NpgH5/h0q0ZU2NmyaTI4\n25VQ4J8W18bTxyBgKf7fAV6N3F+Y6LPY5a5vuWEPsYgLng2RZpyIrZ4eVGeD\ncbSNA805EJJCv6YmoUZaGL9GT3rN8J+5pZhI2gIKnzMMQQaC6QdT9gYiuX2q\nSOfciST5eHKATbAk4XTxc+rd/bOPi67BnarhrkKPAyCH/DT5NLJ3H0zdsEe4\nbGIB\r\n=wMwa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUiOd7+KEldveUQwGclFYO+jl6VEmBtvtQTi3aIDDoagIgDXHZnPpbkCsMu8XZ/4zAnMCdLH55ebCypbFq1qyuVn8="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_7.3.1-alpha.0_1597028823517_0.4141789919588472"},"_hasShrinkwrap":false},"8.0.0-alpha.0":{"name":"@redux-model/react","version":"8.0.0-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.0-alpha.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"06026d37d061fff5305bb71d822acbbf377ce294","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.0-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-qezIbPv4/BMhnOdANu+RaoUAZ6KHfG2ygQWOrEMkEUPjiw/rwhAGPJGjBLusqXs9Im6yjX6wEfgHoHTN8PIkxw==","shasum":"9406e9df2038451cf6afcad2f180af442b748b1d","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.0-alpha.0.tgz","fileCount":22,"unpackedSize":33049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM47hCRA9TVsSAnZWagAAvxgQAIynEpK6aP/njLHkC7UY\nHT5zBUDHAaQ4rZe+FjhKTH3Hgfbnctnx/q5uFKhEVx9wLUeJgtc2QslijDr7\nesj7+QyqEVdGc/fqBJ2XwfMfbP8CPJ5Zr5TyNTRB5ghzullzFdrXSPeaMfcv\nyV8lyJt5zWPCFHCNPouMoWz3r6imZpKinQSZW3jNGR2ENa4kkfmboJxhpw4o\nNn/oySa+aWxHYGVKDcrFxFb9W02UcXL8aWQszIs7yH5j3DhQ6bVpK+pcQEcv\n+BzJhbef0YzylTzTv886q+QF9GhsJjCI44PyQZmnvO1ma25TLypN/ZgYxgGa\nsLN5/Q9+n3gWpqlEvCvDjpUmc69qj1Rk/eMlu3vro9/jR6uBJwKUZHkVixiM\nRAvcuZEVOwfA51vEiTcUKMJhsbhdYbgAJxaQssh8Of4Z6frMzJg1wq3W64uf\n7GTDA/0nCXy3+3GIC0skrxKGuDYoIxP/9Zu9K5srIWDrT5Gq7C8yyAAn/Nuc\nfaG/wBtWrPFHLfEuW55pujxNUHlvnDAhONLER2wrydx+Amp3Z9av2tSTQruh\nlk2aJBgnSh1pv+s6E4aiG5v9EWVvRAa4wz7YFnPKDZLOLJ+OLWy3hRSZJuri\nptulp266F/iGLsWN5mc+AoQfGXaY7YDD7dCD+w6W/7M7ikXrUTMa5O0K4ZXX\nUHlR\r\n=3+C4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpNAUEbTwQTr13Yb06pDoUhC9l1kh8zlvahHK8pHIsZAiEA9XdNr1yI5TGyCVylD9rcb4x4UF4Sm153UAZFlu3qUZQ="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.0-alpha.0_1597214432517_0.8404586044318958"},"_hasShrinkwrap":false},"8.0.0":{"name":"@redux-model/react","version":"8.0.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.0","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"5cd6cdc0359c13f9afb97758a490b3fcbed7a4c9","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-zAK9IaXv4nQStJp/pf51K77BTYnG8jbhxK4i7x2P/72mxjJoblkZfEPIzuvu/m9KVIpW8Tk4KMTqTUDROIpaQw==","shasum":"563505c459a7aa0d9028af763740b92ef7c06df2","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.0.tgz","fileCount":22,"unpackedSize":33033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM5DqCRA9TVsSAnZWagAARs8P/i+f8XSu/vJSmDJg82n8\n4aTzgxeVGMx2P9YhpIxBVViCY3OKj+o2xN5AA0iUeO1dCeXOxpDvfY5zyCLV\na/d5bZwE6TyVM4P6kRODxONcQBDFXgWmkzi1bL6X2Ach/BbGoYwhE/IRH+nL\nzfoq0+sIze9ZIxletSXz2nbwlzHYISdmdxDV9s+IadMIJUz/NOQl+xaDwlrz\nxbjVQjk/Z2wpzO/YEwHe3vx+zggeiVyO/HMigXm6OlzbQabsWCvQnkZ5R+I5\njuy4V3d27+KK9B+NAVAt3cF6C765INyEBeSYT8Ahx22SmRtxRZ9xkHv7l0xJ\ni7Ci+an9CXtlPkK/69941OUck0750DfDcS3ajfrMZ4H9+vqIGPzickStXpUf\nIJzt4aCJfl42BZ/6pU/rpFt8+x69vvZMrjArCwfr8bZ4LtdacI8hcWDzjQ8X\nGX1hc2lqxVnu66nwOeb5Sn24pfzbb/Le8Jp/lYDAVrCB/mijZb8Z7bV5Gtvd\ns4MTk4cDoNzR5sIo5lsUF3pI66oSdBs/+bp6u6Id2eaC/vvo0Y989JLLgJ4m\nxldPomSSd/Gk9rgCa8r58RUYgZmqHFzKGg5/RZstZEF7iT1WutRZWTgmsAZL\niJxE61V7pMB0tAczO5IAijxLFCInigMlVWxSHLUcnGWOb9IFcZ1ZoPI+Jxcb\npQhh\r\n=J8ef\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICN665KnoOi6CkuRqEuI1St3M8no/ApIxL4OPd7bRVsRAiB1fNY6JgiLKbb/r0SEPsXijDxoIx5GgzyNaq1Sa5WcZA=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.0_1597214954342_0.36269233889288954"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.0.1-alpha.1":{"name":"@redux-model/react","version":"8.0.1-alpha.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.1-alpha.1","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"63e11a241dd23d819996d405f775acde8f96bea9","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.1-alpha.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-Q8i0mFJqrwRBZGzBcBIZ1ONI3HdyITKG9T/si4yMVDS6LK0DWqgduqlYfMW5Elkw/UI3pwG7XTOkj01AnM/GtQ==","shasum":"f754900451e1f875978b9a49a16ae4d70b0651ff","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.1-alpha.1.tgz","fileCount":22,"unpackedSize":33019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOBVbCRA9TVsSAnZWagAAQNYQAI6M/DKAmaKnDXF1Y92+\nubiok9XF9mTK8yJGITyw60fJcW0RVLevQt+/foQgK5GaCDSJut25tTmLHJZF\n761oA6oClO53jyDVCyv0w4s/vxa3r/3CGV0vAoYlwk0GMBehK6u6KeUel+Cs\npq+vGhI1aNkAahXMIv6iN33ao+L3sxQTFhCv32JAfO5uZDtZhy4qulh8LO78\nyWIGKeQuHRFnEPdye6bziPfpO3FmKuihLS2bOehDf+0KVIAT9rWmKkppBlOh\n/b/X5ZbjomQOBlOngFeHBUuT6nSg48B8aCwhlk61/GWcWOBqRKDCDSLWR7Ix\nQjrK5VJMbVP6RHdre3Ze84GhLzievSJIXmZOOVFSNSRXY8mkNqXKRwauKWE4\nVDbjU3dQsTDh9HoPK5sfhSIIpOlihKm3bPN7RgGyj6qytpwDuo4lMX8Gfduc\n7yvu6Gn66/0u5LhZwaWjgsyQ/o/+xapXUK8/wG8DT7ExHdVkyIJaM+F5yzfB\nxiGbT/wgT2tkWJ7SGoTeP0ENvrCVRpW1yriOZpMrNguzfVPgahF/vke+7ltZ\nA2036tYWQK2NLRCIJR/h54XhVjiGymWCvups7nKGD0xnG7BzRScWi1hmnzJ7\nlky4khduFiFoTYyUyFg1IhO3mqoqycp45CgACiu27FD4AYQwbYlwKCivC9IW\nJvAC\r\n=fRmT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC37VTwlmm3H1BB49XHtvd2JWzk05AfVBl8cNX9Un4NKAiEA79buHQsjI9gqDVghayB44NDHnR2/jYlkkBqVNbbgung="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.1-alpha.1_1597511002673_0.8966644136632134"},"_hasShrinkwrap":false},"8.0.1-alpha.2":{"name":"@redux-model/react","version":"8.0.1-alpha.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.1-alpha.2","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"145803b3a1e6c7bb83a6fdf4ef23d5ae2f2c86fd","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.1-alpha.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-Sbj1BkqVSEEmLKR3618nxEMRPU4zCjnVPuqenWCDTxcx71fkHu4MnJLgraCXTKUafVwKnGyCFARNoxeUJpf1IA==","shasum":"d9938ec401aeb3af90fbbcb0cb8203ac01da3dba","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.1-alpha.2.tgz","fileCount":22,"unpackedSize":33049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOKh9CRA9TVsSAnZWagAARBcP/Rd2ov5W81xWyHalaA7n\niEeh8kXMW5MTIj971iNjb+H9ZTA21kkdYu/MHmTEfp42Y3l/vvqlc7wE0sEk\nwGgY4tEC/mpbjz1ZindfKSwJUR3rNb6DG3o9EdB0253nrh04lluthAQXCweA\nzkbnWcLYPwwdsZsw1EHeBJ1CNei5SKrXUaQ7MGLSHqw8bYcyG/9AswzdCvnq\n1/DgWzFIrLQCR+cwfN0B9FYqWywAp9bLF91sXtGwIkpBtt7grebrcORdANPJ\nSNf1RztaeuyroXegOpjbfLx7MGpPa5c0sIKXJSHjtLbxL02ZAFLKm4Mu4rYd\nNdpy78GW/vR8noJNvoJPglEqtTFKMMfnOfzcG9muAqNh4o9VqAq19lBe88BR\nj1YBGpK+vqVwH3lM0YAU+nN8VgsY4kFiqhgLeJG+qYaHIRAfFmypTaIUVeM4\nRXwwyy8rHHuQvaPXbbOkI9QAcm7BW1isBKn9jbfdhS+LlklYXanx/w9ndClg\nrfSp8Mmqz8lgipHUYRpDvnGsr3e49UR4dmfb+CpNP59tlNpCSb6aImbCZHhy\n6AB7ZF5m84eQRB73hqFuqhHWzUwxVjy3/msveBBuUUXInv4RTdG96JKegJaO\nxe/D/YqMeKxvwS09WxKr63c5t5wbXPM0kYpTEzPuS7sda1Gna4rkPsGLkYWF\nzqmC\r\n=I6/k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfP6VBCuIYJMvNFZsb+L/9whTJ+rhQ0YaFCqRsJd7INAiEAoUq613symtb+Oz3YWkfJ73otg+R/dRbIwHCJDEvz578="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.1-alpha.2_1597548668676_0.5499054515584829"},"_hasShrinkwrap":false},"8.0.1-alpha.3":{"name":"@redux-model/react","version":"8.0.1-alpha.3","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.1-alpha.3","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"3b6c036be8449bd2ac43edff2ecea39b488da247","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.1-alpha.3","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-mdDQeEbgVE4Qe7WHDdD026xbQ0XuRHdH2SEccL3ZKyzBPGOEpSF9J9235MzGkG7OBwjwa51Kmk0eMFjvqVwpJQ==","shasum":"234a14fa162eb30aaa93a5e44de468b2512a9247","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.1-alpha.3.tgz","fileCount":22,"unpackedSize":33049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOMGBCRA9TVsSAnZWagAAjPIQAJAN3li4VZ5TlzmSIojX\nOPNLjh9yREtVewa/x83BTFjm9JemUPrX3NyBNDdiDuDQp3ZBDbL5cAVl56IN\n7zL9cvXyGLy6Epp12IWKJi8yN/flULJbX6AZ1hZsrV2fLJ4FS+zmV4ss+4mu\n/vVZnokMT7X+yoPTMle0zPYg23MXPnmkSXTOMTdWYrt4hao7qpIlXAPgAwLO\nVthrKESY3JM8CeQTJhMrSblf/kyM9SU6JzoadvRuvQRBnHTVPoLgUYsIj/WZ\nVxgIE5Ydq28lX9VlxNpvVUEGXGH+5SSWJXxL8wwn6wpqoYoGpI37ACbQhSzE\ndjCSdyBk3GHeSGyWz/YUgZuM4UVX3WhBk2jNG6+sodMYchrVj//ja/XwBANJ\nPQAAeC2CsXRuzhcpN3dNgpkgJDTLAfCAn53AiobJSMdG04jyo361WGQ96hLT\nt62NRchtF6pLh8ZldgLYh60QX8eH3X68XBQNuAW6aaCXYhxxLd3mhxAL/dw9\nx+5WxArRzAjGPRLafOiWgBWzbN6p/PIKCGeUl3aoGp0qLUMKzWMaS8v4GUkk\nQ6bg4hpSxKUCTOchh10qfVp9UYGZ+jVpEDg2Tw4VdCWczJIhShuFZuOXIo3S\nDMmUZQindh+FhmjdY7cScyUtgApS2SsJa5e2Mk+fqFz+am21tQLWY2nzECQF\nCMqU\r\n=mjUE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwdeFbMShMdy/ez8iFmmMdcXPuNyjUwMtMD4Gwf9W+IwIhAOmMMSzloSa3Dd/k9jR9yH99hJExw7vVxIM6JJagdE9K"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.1-alpha.3_1597555073340_0.46231080047383766"},"_hasShrinkwrap":false},"8.0.1-alpha.4":{"name":"@redux-model/react","version":"8.0.1-alpha.4","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.1-alpha.4","axios":"0.19.2","tslib":"2.0.0"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"acb90bfd9766e7f1ef68766d3b9bbc51a8c7f46d","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n众多知名的状态管理框架，基本都是为JS用户设计的。离散的代码结构、严格的设计模式、不合时宜的细节封装，都意味着想完美融入TypeScript，就必须经常手动注入类型。幸运的是，Redux-Model专门为Typescript设计，强健的自动推导能力，允许类型一次注入，到处使用。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，超高开发效率\n* 使用mvvm快速处理reducer\n* **无typescript不编程，拥有100%无死角的业务代码类型提示**\n* 内置http服务，请求action自带loading追踪、节流\n* React/Vue Hooks\n* 数据持久化\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Vue v3\n```bash\nnpm install @redux-model/vue redux\n```\n\n### Taro v3\n```bash\nnpm install @redux-model/taro redux react-redux\n```\n\n### 其它\n* 对于Taro 3.0之前的版本，请安装 **@redux-model/taro@6.9.2**\n* 对于Vue 3.0之前的版本，请安装 **@redux-model/vue@6.9.2**\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  increase = this.action((state) => {\n    state.counter += 1;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/user/${id}`)\n      .onSuccess((state, action) => {\n        state.counter += 1;\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 在React Hooks中使用\n```typescript jsx\nimport React, { FC } from 'react';\n\nconst App: FC = () => {\n  const counter = testModel.useData((data) => data.counter);\n  const loading = testModel.getUser.useLoading();\n\n  const increase = () => {\n    testModel.increase();\n    testModel.getUser(3);\n  };\n\n  return (\n    <button onClick={increase}>\n      {loading ? 'Waiting...' : `You clicked ${counter} times`}\n    </button>\n  );\n};\n\nexport default App;\n```\n\n# 在Vue Hooks中使用\n```vue\n<template>\n  <button @click=\"increase\">\n    {{loading.value ? 'Waiting...' : `You clicked ${counter.value} times`}}\n  </button>\n</template>\n\n<script>\nexport default {\n  setup() {\n    const increase = () => {\n      testModel.increase();\n      testModel.getUser(3);\n    };\n\n    const counter = testModel.useData((data) => data.counter);\n    const loading = testModel.getUser.useLoading();\n\n    return {\n      increase,\n      counter,\n      loading,\n    };\n  }\n};\n</script>\n```\n\n# 在Redux Connect中使用\n```typescript jsx\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\ntype Props = ReturnType<typeof mapStateToProps>;\n\nclass App extends Component<Props> {\n  increase() {\n    testModel.increase();\n    testModel.getUser(3);\n  }\n\n  render() {\n    const { loading, counter } = this.props;\n    return (\n      <button onClick={this.increase}>\n          {loading ? 'Waiting...' : `You clicked ${counter} times`}\n      </button>\n    );\n  }\n}\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter,\n    loading: testModel.getUser.loading,\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 简单的例子\n\n* [React Web](https://github.com/redux-model/redux-model-web-demo)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.1-alpha.4","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-/6VL+G1g6uwmpFtgIhVATOQOn4oeLXM0HqS2Xx63SNeXWtwRoSFhmwJqUOIpFcTiDMTC2I8daea6Ex2Mfo1vnQ==","shasum":"02cafe7e47a7c630d1a9e1d584df3ecbc178cfa0","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.1-alpha.4.tgz","fileCount":22,"unpackedSize":33049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOM23CRA9TVsSAnZWagAAiC8P/2htSN4rk9w0ESsxwDBz\nZDQ0YnQt1N6RsE0mY/xGRZJ5Ij8cAtFizvgMndUVqiAe+Zrx34QbwGAikcL5\n9/H3j5JfGg1bCsvctXxVq4sUh3uZAuL3GpRMSo0qgrzraquCI/fKBUmNLGou\nudMMj4AgPRWoX3z05h1Pm6J1GZGdPUEZq6fbi78Jm3nSYTZiXNPWxq24gVbD\nCI47vW0RMphMFuBQPffxjlvAVMVGtU9lQ1d9HrjTGJsFuwTa45fh9qBKw+m6\nrpBlGIkQCIdjLoFmPtzWzpe+natODZqxcvIRcHx78UbMf1FbXajevbauZ//M\n9bcIiwXaEU2N3Ib6dKlTVtGW5BDlxoWFVVmOmqPfCHWEEavCVFh0kcnXqu5j\n+Nsy12hNWgt1VVNz9ITAoghYuW+Rz4zIGCmylqGH15romK0RaC/5r3ujjNeW\nJSDjGJdF+lSC1XoD/VhqsZxqMlI6BvnJIDiL8XBLBBeV3z4i8kSSRn3AZBd1\nwNbugf8sLJE28ohyd2nZo8nWjxNm9Efc3AEhNzhs09TwqIyF2204afYCgIm9\nindeQNRFV+jrX6TzpgM1XZMN6sFkcTsvV6nw8WLbtqJBy6w0x4nLMjqDWT9t\ndkDVlTlYRDJjcWe1r785dyV27bIirFvXFC9jaWK4QmNVUe2qJ3AGSosCI+OU\nmfgM\r\n=046e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8RbdCGLP3bo1qW7W/fnFA6u2klWa4wE0YC35IFKHlbAiBuWVE4A37dBP1DxFGhrMU54ocVNeDUeSsueVdRGU19fg=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.1-alpha.4_1597558198684_0.44569144951475104"},"_hasShrinkwrap":false},"8.0.1":{"name":"@redux-model/react","version":"8.0.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.1","axios":"0.19.2","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"9adf76d65601db511572df06cfd01a68cf610750","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-9aSVdgS0SItLcK5LI1HNJcidE64o2sbrCTwhwo6iR6+6BMkzSwqn66ZX98331IpPseEyKRDnRK09e9GCMDpPdA==","shasum":"ff97d7963200d1293241a7d3f556700e29ffd5c8","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.1.tgz","fileCount":22,"unpackedSize":33234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOPcnCRA9TVsSAnZWagAA2oMQAIGg33Et1JNzUbrGrONb\nxW/Eg8uRuBnlFE56LkZNuevSN8izX1t/rSRf1RAqw0abaKsqE8P7WN3sqNdy\n1g7az/hnaJFuPx+BSjyWTZ0RRE8rABRKktEW45s0YbJcqmMSqfvKN6a+IwaQ\nynEh3wUllA7dnB537U//5ICxAHf2mBxF5M17hYc1hEgeTQ6UY0J3REGdLDfL\nTQJk5mENZjsLSCB0ZFhH1jbYdOcQLkUtOAu3HtE6fzfsxX/fM+pnkglE1Jtt\npYVEUdUNXxnEaClC2dsaVV8PZY9SHBu+YlkBe+KApQbQ6A5tBN9fKD0bFuKq\n1BQqREoY15fsCnuKDnZSynjUEqRrR4uOV3iBKSANV0PstTk4ygJtS6tuNqpk\nKT4W2J0hUcUHoBtC8MmrrFvOZ7fIfaiC7+s9Rzgx2fnZbJLfsmjZJhIGJlAa\n++zt7pU9vFIplPx8vPgSCXJ6biYK7/qXIpDOr2MzfrBD07PgHH9DHaN9Bhwh\nk6nBcgf7bWjfl2xLLdKRTr0/Dz18p0H0si58YJFfFaqcAH+NTubwGZuvUp7C\n1BEiQhMg1E7Ab6RITr3gbyI69cs5jY/hfV/c9WNJCaM5fXovUuHbs1V7GnCC\nf0ou6I13d5coQyWV3+38aL+1ck36EwAAqUIg7HaeQbCVhKDN3rJA6xjqt6Gz\nKLfq\r\n=gh64\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXlROBUghJjF41OCeqEEMW6IWuOweqiiAh/BpZ2qMhzQIhAIjgF4iHEfUVlWoiKrx2ZbpHktVVXl7PcIo752YR4Tmn"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.1_1597568806618_0.5162339599149441"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.0.2":{"name":"@redux-model/react","version":"8.0.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.0.2","axios":"0.19.2","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"91293ca98a4cd8cbe436410b62e7a752b42da4fb","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.0.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-jP1SBX0+jq/4wxQ6jSa5XX2CkKYYWrN2bVESnhBf2ZgE4Rk8uDhb7wc1NEketZBUFTDCfz/I+21+pteJ8g72Kg==","shasum":"bfd5dc62a8aa0f4923b15a1fc07c2a3a0e16aa84","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.0.2.tgz","fileCount":22,"unpackedSize":33802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSv8NCRA9TVsSAnZWagAAJrQP/0FR9aak1D2I6u7LcBeJ\nazAOP5z0XmGm8YoK5M/q9GfkLFg52QYcPOxrn57uxxcpQ4LaisaqMXC3OuMo\npOHbHzfzg7CTVEpicnnTJshPrNs4Q3VJ64994e3+6X86nzqGZty0apMRhCsr\n9KUdHkyGbytxWzcBJdeIJIvRCGRIPIOlxmoPavQ2Owt9Ml6KSgWFaTVhLx1X\nYllTTT8IriVBWV04LzDluMe9cP8GmsS84CckFmzluytW10YvL79oVv+aAXTs\nnWcEkhc9M65kRI8lgEP2nr+O3zLdrjnU85ga3nr5aoEgpyA4QL3On3KpMb3i\nN6N2qE1HeqZqVIquONaXjHKbT5/Ee6vvd8cPrGHwJHvitvVwFkq0vu0Ziipa\nH/76FkDCNgWR6Y3o4ufPwUtk3W4MKqzBLCJgHN/T2JW6BhYtiaJVM0XhIlia\nmGzy0/BqE0sRVVdi8qWSEhO0ibp+OwMPPn25rBDISdGRXz88qH49PR9jdJAk\n+FwdB9RoL37mTfLD1hOHIuCXBTyo5wk54QZ2qARrUySx+NSPjLYq5okIs3ws\nySJgVdo8Xe8hSEP3HuLZHIB4TUJO0CHAEnlVixoqW5bHOfgbGgGLGar078Ba\n5Nf4B5r6E2fEilaYFcCZfW9qMziP43AMZLbiqkh42FPzqxh4P7/ESkQ+oZrd\nbg9d\r\n=y+K9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZ+PH9VqSF2qoiNCiKuE4YGz3W2CEKLKmGk9RIXQ1ztAiEAtw24iGlxo6DQ5Mue/FAe8TB/P6pU/PwtsPkH3MWXBw8="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.0.2_1598750477391_0.9655512727317177"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.1.0":{"name":"@redux-model/react","version":"8.1.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.1.0","axios":"0.19.2","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"fc3ee2197148517e2a85318f570f3a2d67c0784d","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.1.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-ek55oDvSNxyR7G/thV8dtmtzYIlAXJ7TLGMSfeeIlromQoJemd/W0FIxuI26eIfO0mBSb7vIWjF8n7/qR/GjbA==","shasum":"25f49ba6f5b33276b3b0852bec8af6d937cbf75a","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.1.0.tgz","fileCount":22,"unpackedSize":34175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSyqlCRA9TVsSAnZWagAAZf0P/1ZjPPcLw6AyOwcMFmgr\nr+sJXXwz0JRWi9JtBburB67Xxug+GbodzQ36AJjXRyQbLtPzN75OIcUsGUzv\ntG2t2lI5gtn8T9eSD6TXizWVlvRYRMcRict0UduR0I5qtvBssdCaQCcpalPA\nq8w6RFqbC2PwRcM+3gjF7wxy8uQbIWpd+216EuR6IEuPv3gnLfxewLMGheBy\nE1dqtAyOMOVls6BHJ8e+GdTK0ppVkMBhRbAp27/+ItA4bAn3GWbe3En578dv\nQN3ESdQTOl+0r0E40rykdYVtHxdvs2OJAgPUt7X04PeoOModtjHlA+ef2n2S\nVGaU5jMGhaeyxKJMR7MX/fWzKXtrbzlZzb04sUmgw25s9sJdYTl+/0PQC5Od\ns2ocIrRYfHWk+//7k3o5xcwtYQwVSFL/uwMG7CKS01uNCNNhICr2IwETgpNl\nLmQySwRYlUg8+1wpzLtQgZSFm9Ayv7gGREeCcVFT+IjR/J6UPL+lfCA1baus\nXX3zgDmtgbq46c4VIviGHSPhc18vL6c+qIL5mS99fvUE0IAtfglXrfuVw0vy\n1FwHqRcAHtKzW3MeKPgqN9Wq9sAmodsmFZzuFovlaPkOUwFRy+ZDhGXfRpi4\n51jT8cFCKEwuxRs6/cyJ7RgNWX58Esf/B242001dBj2QDF3qAqEaVeifiYe3\nUI3F\r\n=OK9v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmKz4rxGwV3fIpWvxc4KgmKAoWmstxcYaJUbaRTaF8zAiEAkwFcvzkmNKSEFDF+1HsCyPkAcoWHWcSt1zYWrf0fmfk="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.1.0_1598761636865_0.5004498592553217"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.1.1":{"name":"@redux-model/react","version":"8.1.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.1.0","axios":"0.19.2","promise-listen-catch":"0.0.6","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"81926de20592ca5d149ff9dfed8e0feb3d3a16b9","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.1.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-6pXFGROpkhAEVnOVS+lNeMTcVOtxxlR8/ULKjmJ06xvWy6zYYY4dl6DqrQjk8PQWqpx24Y0jrOtaNCf42cA22g==","shasum":"1ee21cb34c8bd914d42a6cc7afa6c69b2fae5c4b","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.1.1.tgz","fileCount":22,"unpackedSize":33637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWxaxCRA9TVsSAnZWagAAtEQP/0yJ4n5aIXBBvKvbRS6L\noKSNN4zXBpR1hEFFnKCz4napG3tu9j26ABXAGygNaQhfZE5hhULvkkO33SVn\n8NMTxb2TxerhPvvy/28nOc49+58zbhT6FtIJwvyHMnQW7O63nIb5OuyXrf/B\n/ueKTVQZo6BUooBwN0l31DtcB6sc6iu3ny17q1HWqqFmwSmoYi/hXjRBXMc4\n2gHefHYwbGaULKf4R/WwWQ0yKL/jIOLx6/Brqni+Zz5yNnyYpFyfxq8la2U8\n4KmKOH0v4puUBTYh5M2Con/f7j6uTe3ktywbJXbm1zZguy6/J5DmBFKCwMXb\n/qCggGJXYv8KoSZd7lfqvS4Bst9hJX1sDDJkPJiCdCtuPhjAJ3LxydzZJyIJ\n624ryO/mrq07uhMpkvx8xR21fv3KKkNRCvuJWrg4idbwTcpVd9yzvaUpGxfz\n0DQuAMS4fJljGRug6pgSY5+6XySpxaf06+pyr2Bpqm7nMSqCgT4U4/mLWav2\nOHKKWyTm5fXAu3QLMXvrlJHyoClfdefMxxTTnCvXaWDAYtGDP5NBbKP3UgMW\n91S1i/Xyrv05ws3dMIG2QA9egpzJSvoTsGd47PW6UvcY1DBPj6BmGm/RdWi1\nHzu0GlfAbyx22oe4SncxTSO0jcoExiMQ6WuzOOb0qERmNW1qjKy4+D6TqzBc\nZ2H4\r\n=3lpO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhuZhtsAs1Oe1YGELxRz1xGMuKb8FLSA4hHruOk0+eNAiEA6VroZ0QyvZdad7Yr+CSa764mA0f9uWZt2bPmwmQvaQc="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.1.1_1599805105211_0.4096986508712077"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.1.2":{"name":"@redux-model/react","version":"8.1.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.1.2","axios":"0.19.2","promise-listen-catch":"0.0.7","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"1d01306efaf44b18afe9657f476c326bc3d9104a","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.1.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-wSXqjETINtBtDSYGBEKpSLyuHAmESjTEVlby6usfFJoa7riSboSD9je1l+Gc0zhtx1JsOSMhEAvaGFINEJQUcQ==","shasum":"01aeed5f1f33ca94cc5b42c316d96b7c8f2d9749","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.1.2.tgz","fileCount":22,"unpackedSize":33806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW0noCRA9TVsSAnZWagAA+GEQAJgO34Bj+HWaVGYVOBdV\n1oktzBGiNPdLzbIwjkf57gHlfdRt5yJV0/Idp2qzLhiFZXxZoW1DOmqiup3u\nCzURSGH/Q3FFoK/aVf0GJ4SLhe8JRvWlzsFSLWjac+vIOXBaNnpOSzM00H/l\n2g7I3hIJdgstL4vIDz9iSkg+ESxDtFhOlc66szzlnbARRJ5qa+ugNEj3AfcY\nl4mpiC9XeP3zziYV6r5dIwZAdSFGFgfy2bcMt7wKtJjuKRiDaQYc5BVfRmTX\ni/nlV+gmKUAXwiObbM2BmszSPbFUKGovyemI7IJWplexsibRaWKEu9Ph0Ktg\nuCLUADh3GGDaNEoBJjsx7WZF2Q+Mfz6D7vjowEFHP7b4Jvkwc+0tglY3cQgN\n0e1DFBnjXevOryMfPunhkmGqUMUGuzEdmN/0exAV++TM5mQo+8trGVpzNBwd\nrxI2me/FgkrxfK2FpEI/QUBrHeYnTqAf3o26xnyzXw9gX8N7dmd5Un6Fm9BI\nvG9CGAT96Eq1DtabU4SV2kr/Zm/HlTLFVb20GTck8XcYJ0F3YGja3tL9ffHr\nG08nFatjLSX8WzpoPx34GR7QsiojcyIcGedhtTUwE3pcyzwMxnHjL631asq2\niO1XdmlD1q2xhhAhvLBnd63Z4JOJmHxUP7PG/XfsuNP/MiQHa3jMJaHF1C3/\n71+E\r\n=oV7k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGu0KadO4yh+aVfDmvvY1gp/La7GAQXixU3C8IWFjEPgAiBHQAjNG7+oMcz9aHL76XnHlesuSYjvrPwokL3ojHMxbQ=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.1.2_1599818215762_0.3431927571151858"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.1.3":{"name":"@redux-model/react","version":"8.1.3","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.1.3","axios":"0.19.2","promise-listen-catch":"0.0.7","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"84b23ae4e5b83f8f128372b2b06d0161b82c3f7b","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.1.3","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-zyXPk7w9bueoikbCmD6q3G/ZXDrGuWC0xNtmKmc7DQLoaIX4nCD+p2CpHGJK3LFMkqCZDJe+rQ6dWBS9DWC31Q==","shasum":"9555fd6cc06f99fbdbd41f8d53336f448af8b74d","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.1.3.tgz","fileCount":22,"unpackedSize":34128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW1plCRA9TVsSAnZWagAA+nEP/1E13qdv+TBn9xsoHffS\n95sWail77dlZ3mY9rfN5gmvc4E83eboFDS7AwdFf81FT8YGVUC5YYxeKdYuF\nh3LtNgeMd2YIITpFIZ30X6Y2CaCgtTTpa+F+al4+oCpObssDEbrnczXktXth\nOC3iB15teAw30WLfQ9kzVziITwSxsIe86o+Co0GKdazPOlqIJ0ySXaIunmFH\niYwVhzw1L3PVOr9qHYBMDPJohckhSbFvEMIGuub/c3/VJ7TNFHSaH+ejwQVD\nxL+SFfIScr/5ksTqsrnc6ooCUNmH2BNhyFpb5eSkMKNypdZRx0s2qkDpj+Zc\nAy7GYrkQ7a5+z74sj3CPyBdIROThfbzUhmBeISJBqGTWfifb5Q/SS8Mp5sgh\nWX939rhDf8wYpxINZPBHpHxwmqHW4TzavuE4S0sO3+pcEkGXSls1tJ/8KBQG\nGFn7YX9GDHYc3lQQDxGyiVHEazVdmNUg+2yd7886RUzCaRCw86IJi39MIfWM\nJbYg8K5DrP1IgRlOTPpoSssxK51j9b7ZcKOH+aOetdalCaYT6hokj+c4lQAi\npXeht+1m0z6gu5WDAIwd8cutiT70G5puPVf2tVs47nb58ZKNaAX5xxChBKJe\nQsY9qkpID/aAUm3bHWXpowtF5p9T7sTQQ1gZKND1U4T/u1omF3kgSjMSTItO\nBXqd\r\n=54SC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWwPTwgx5m+jdWqJ1D6ydLGYdT4ULEq4pCDODk7nVs6AiEAxgHTfNEkjGeOQAYvjApOS/i7/Zy+9Wlu9PQstutxPLs="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.1.3_1599822436825_0.8235036157431128"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.2.0":{"name":"@redux-model/react","version":"8.2.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.2.0","axios":"0.19.2","promise-listen-catch":"1.0.0","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"345e79d5f436393a010ac49e627783a6e7ad47ff","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.2.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-VFVkjn+PHxCcJLC1Fy8slpYWoUA3hdP6ig2naUPYydTtTlxrKmNGJ0PLGOqmuzeJrxUVVO2/PRszClxKrXznBQ==","shasum":"2e99c1e3a9ca7288f6c4c7dbedb36c71a68ada6b","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.2.0.tgz","fileCount":22,"unpackedSize":34204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYi7rCRA9TVsSAnZWagAARMYP+wQisKLsoLJxCcPl038X\nM8g8PZjf8XgtJBtipABi2jLghBE+D8wwL+bcDTPH3ySOoPgU4HXBZmHABfGQ\nZLWQV/BfUOai7jpC8E5MqrvZtK8B7zdUTt9LgbTemHAgOk7HELx995W6jcxA\nABe/kJ0bqGFeOHyiCvbcAUGYa2zHy/OT2z/rymwcdyc1VQwW5QUkrlVzVDMG\nmlVJ5vcF9Ct30Idmnl8wgcTF9AW03JEykx6RS8b3ihomNJ0ROGcX3Vwq6cY0\n4ffMgtag41p2B4Pn4MxSU9ES8cCev3OC3cbLh9hZupNkQujphvhjclLWzbG6\n9SZKgvO0Vtxmqp0nAN4ihp3O6ABrHYIx1C094vApM7zJgXil1xvA/HgoZWV1\ns8fE7TrOmnP0YJpOI+mRL+as/22hx9YjWIRq47bma+1fHAZZXBBlYZUib32M\njhUAtd31UZpiizGzNr8P+i5yqBUitiZmwnf/4B4YgPFLfv2h8uJSjo+RqEbh\n18k5sAGCoYGxg4TCbOP6dH/X6XMo8V5bNW5s84jRM4zks207Kww75OIzi8Z2\nyT1NhDkTH4m/S/sGltjobqKRkSVzubuRMOFkoWWc39wXJzjSIjAsx3FmMwpf\nkr0YHlACd/VsHI+YIKb90IKsbOXUPDagiaU2L6oQwCoMOEmpRvmIg/8mdL+y\nIkve\r\n=/H71\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzUgrZn5ph+B5BjQdhDRUA91WJlQ3hnv0UrZhNXl2WEgIhAKVoCReyMyAQjSnCqNao/kkhF65/lyedjOSToTG+OwAG"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.2.0_1600270058532_0.46064027357736115"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.2.1":{"name":"@redux-model/react","version":"8.2.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.2.1","axios":"0.19.2","promise-listen-catch":"1.0.0","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"4c2d91976814e3ed1e7e1fbaae5916117441184d","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.2.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-FjIs9Qk4pdKr3Ct9+XgdIpzoXJ5vlGTET7QSSCnUvT+JjvK8+SdpmCVLkK+4DRLTjvBNXo/lJ55361crgceO9Q==","shasum":"1f4303d5b785a0872b8dcaa3f36b733a379e03e6","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.2.1.tgz","fileCount":22,"unpackedSize":34368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa2n5CRA9TVsSAnZWagAACqwQAKDZ2JgO/3BaBavIh+1d\nqLkKZyvHQxk9Moato7Wfu0pUEvtp7suqaeZ0dwTo0kQsiocecO7oOFptQoNe\nneBm3yk9s+XN4Qh3+Y1EEtVrboy5Vsx/atJVxPoqms1AixM+zPSurk9kThd0\ndWma6AjuKwMwd5EBDKJ/A4H7RsJ2XXcic80ShPhWcOcdP4YRS/1tj+B1Q4R5\naaYyIquiK2cWqPjeak53fr6XI9Fb+pTSFjk9YtXfVoufvfgEchoQakeHVXgN\n/o968yOM8h8IfpcT53hRusSiN75S8bXXvvtQq1Yi0LjKBBbaeEFd8vJrnKEA\njqUTLohL2P0aaP4Gz8Tt6T7Uvp4h3FRzv5owVeyxeMUU3cTNPbcIKdPyrqxx\n/jmM8Q1SijsEfpat9riDam19MGRQCVSgMhgfp2lWFe7qUpg/5F6ZIbrwnZaG\no4zC1wINSFPYjSwHnzKmBBf4A4+0GdQl3EgTmOIi64PkWg5kxq/H6DFj0Hph\n15mIh4DG6yheNj86sYuOJ+t8cy82YMnLUpk05RfieW1V+F9IS7l1HaOvrg1Y\n9M62dDl3mtpjHrcyes8/2qMBZ0cy0Putq5B3I8PCEAIGc0qksFDuyBZ470jx\ness6cPpWL2iqa2hFV7NPGW5b+Ic/Mvn8c9a3qKaWQ+K3bmQKkHdIOd6hi6LD\nQq6U\r\n=vnib\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGquseaNbij1CYeDiU+x7HojaJH7wyubuyf/3F57NSJKAiArjpk6E0IAQUVgsiCmcrRvOJFXYk4DtYMnB8HD+9Punw=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.2.1_1600875000582_0.40698169911882554"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.2.2-alpha.0":{"name":"@redux-model/react","version":"8.2.2-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.2.2-alpha.0","axios":"0.19.2","promise-listen-catch":"1.0.0","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"d86cdc96dfc5f87e8032e5c84a498307507b1236","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro redux react-redux\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue redux\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2 redux\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.2.2-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-3KtS9AJTFzWjkQ0PotuUvhyTvDiXLH5GnOe9YZLcKNNWCh57qAcnvrAmJs/HguRJjLgMgMFKEWMszNw9S66LpQ==","shasum":"280b1f21432cdde91377446311fde65f48bef6c0","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.2.2-alpha.0.tgz","fileCount":22,"unpackedSize":38602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfccWECRA9TVsSAnZWagAAuJgP/A8CDe8GXmMsvfY44Hnx\nrcM0kqNsUr9Z1/3RXfCSSjtPQCkQ8gvs3LxwhlxGO0zw+mRpSYi/ZknKxAZ2\niZfnTgiCnW2lmrFwLMHXNwMjBIkHno5dNXgivLNoknXqykkL59NmTZk/QDSZ\n9Y8nfdLekMM8xZmM6e7UbbskySXh/Mv/smWe0Qp09E7EB0/qI4ajztiiFIfB\n/DLt/hgVEvjnehNXE5shg/f/Wtx+uaOHz7Zapi17F4otYOieQo+AFF71M9ui\nA2IWE3ckkMh0RfBKfNpd8M0WDgyyGTJV04juDG4WARyhiG2HwZjXNDuwCw4J\nVkrAjAwAtqGyE45mkibBhGsDl41DzS+zT077coWMIlFiZHESlqB0eAw1gAqk\nm9peUN6rXDVBMc/jRWiJI+k/BM6f77HL0M0wfsY/gEy+KUWHghgpjumPUVKa\nYL7VFUZUFzXX7SmNLtHuQgOptw1nu9g/7sGMVxQSNnFAR41SXDIPTtfXPumu\nBzezG+FEAvgpFLFDd8/iZTuP2h4Mf2xurDUbAlTUOyQsYXjXnMruC7mmWESa\nUg8gb3+F2VnMpobFkmmHSEnnMH+SIfg6jPc4hJUP1z5x6Xbve1m4QU6FDenC\nD4TkLgLiB2UOrH8UQllozRpN98WEZ1w+Z7+YRqJ4PlzzIs7EOpWYh0ei/GtA\n0rxZ\r\n=zFhK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgjJCSvjDStFVxPEv4ZlMfK4VmhSy3Y6T0e39Xp57pawIgETsBkylIA+AkB02BrDQSs0isx80IdzGG2wKMfs834fQ="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.2.2-alpha.0_1601291652009_0.769738447566302"},"_hasShrinkwrap":false},"8.2.2-alpha.1":{"name":"@redux-model/react","version":"8.2.2-alpha.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.2.2-alpha.1","axios":"0.19.2","promise-listen-catch":"1.0.0","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"eabcd07856cf33c01bc898c848d09d22615afe85","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro redux react-redux\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue redux\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2 redux\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.2.2-alpha.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-GDhScSbGggpbLQxbl8awdM7CUuTCDZMjrB0MeEg+WjHo+xoaVTlaY7ybjdTnzwqH6oYNS0hRnaBR8v+n7fcMMA==","shasum":"0b982d8c1c178728701eede2e45080d4bd3d5c96","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.2.2-alpha.1.tgz","fileCount":22,"unpackedSize":38602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcdqNCRA9TVsSAnZWagAA2HQP/1iVVdyFtQ0UBF/EWsGV\ntzBuF01Xmc1lTJA2/mht7oH3/hqcfV9fxfO0S92aas5JafnGGlppSGJSD3nH\njjRxzSDuDSR1HvAoKIFQlNMLlPlcdNb7iyrpG9tQxuC+zLj3nrcyvYXRB0S2\n0wEinG5QKI2Jo4L3MZtlJJUnol/9p6WcEiXvjRGtGQngk9nOA2ycd9MjEhqO\n1jIAF/BvHmsiznHlyLaH6wzWWMKbZDPpPJYZJlDf/dux40BkdL9oKegU3Kqh\n0AWjk77fpAbogcKxLFqiPmvkFMGhNg0LlfOiujBbATFOF1VdOcU5SdDLQ7od\nyuOAe21tMlWXst5v7Htax0kwEMiIFT4St4wQZ3rC3td/qFHCwT3cJaEBC9zB\n0W/GruyGxrlhH0jpzpgczq1e9sQyfbYPhCzluzxbzpqXteUvr7Gw+0ujhqFh\nQyOjBuZHccd+XcrEUUQSOSGGx8RABdoWbwjxE04F+7mzpuMUkYXNB45Bx1aR\nclehsExnhIiqzcbU6DkQfkdgP+bfRJCrKvgVKIbMbCL6slx+f2oGLf2kZ3oR\nnX/qI2n2GO3kEhgrew9eknDn9iySnIpfiQdyFv8X58nevv2bHG9Oo0IGKBnw\nYxOZbW1OvQxScSGKKjERNJtUNnQPSpNPLF/NGqVR+6yJuJY/1Jg/58AekGn/\n3I0b\r\n=0Ou9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwl97wg4fjR/y9nJDz88ErjIPw+pKmcKqqlRgYxsIR+AiEAhmUazKydbPEpTZQyaspUdKnDC/WSB1j+nkITsFra4q8="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.2.2-alpha.1_1601297036591_0.48185984117176983"},"_hasShrinkwrap":false},"8.2.2-alpha.2":{"name":"@redux-model/react","version":"8.2.2-alpha.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.2.2-alpha.2","axios":"0.19.2","promise-listen-catch":"1.0.0","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"2f1fba5c8e719d7855e85d19b32622fea0d0a0f5","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react redux react-redux\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro redux react-redux\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue redux\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2 redux\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.2.2-alpha.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-mWisYg4mwlPzpkvCrkRo1olHbnX627/VEwptfO+qxu+XAQ0/lCYuYYSX3lmGahMf1SPMwRt/VfBIdb+PZ/qQuQ==","shasum":"1f134f68e4155001de559e228b485e6a6b5f1436","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.2.2-alpha.2.tgz","fileCount":40,"unpackedSize":61238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcv31CRA9TVsSAnZWagAA19cQAJ/VX1KaB0P9g8VggAPF\nKg+RoLAXLXk9O2H53m5Q56vXQelkGXkiHReTmBuI/9h40INyY6QJbxEPV6/h\noX0/QTgLqcfONn5zlQxwfb6g4bY0Lm22A/WebIlfyBT/7opYLkT3i+MxA1bc\nYE7Mno/9d/+V4ITddYQJ8Ev7njhf0x8Y/AiRhrHw6Ml7xawR7xpbx4fgTaFE\ny2RyK+m36/JoNk5Z0EtZKLexX97J36HUfoJwkLdF+jDuKE3jQT4Qdz945Ghj\nmukoRddTm6UwVPLtNvqVIM5RCq+tHlw+F1LYmJ1EVavzE7eT/Vp2rIYRtLoP\nkTg6wEVtDejmQjFRPXdWX2DUL18qNXwXEopNBFdHfUzAw5Z7Y5zSr8EstEys\niLehJ6BqZhiD5hw2MJJAcPgwXGdOoyjAESAVUF6JevQscWRIIyv4vMw44bvC\nMx85QBocQVui8O3nPRYWZIFg3do8c79MGEJ7GrD88fqz/RXUA4AqKWtZi0xz\nfjlgOaX4kOUBz+ABVai8+BWHngigzxcV/YfOgQT7AoOmJ2daKq2gB2paiSwZ\nsACL2eGifafO8U/DWQ50lAgOinLGdDfStuBrRtW0fm0T10EKl22PSum+GW+l\nhaktRXuWB196K8lZA/cRKCkiqoidmhUg7oj51tV5rC5mnAqhyBgujZ26ZpfE\njqyD\r\n=Vdxp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgi5ozVdsZZJpRMx3DN5Lg08bYEAKIFkeqwd4lHOPNbAiBXjbpR5Z+FurtGIFLyX1g3ZBlRd4U82Lyf8AtLgTiEfw=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.2.2-alpha.2_1601371636586_0.5807426412840102"},"_hasShrinkwrap":false},"8.2.2":{"name":"@redux-model/react","version":"8.2.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"peerDependencies":{"react-redux":"^7.1.0","redux":"^4.0.0"},"dependencies":{"@redux-model/core":"8.2.2","axios":"0.19.2","promise-listen-catch":"1.0.0","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-redux":"^7.1.9","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-redux":"^7.2.0","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"3e6c6e411cbe69033f452fada09617e22d61ff1b","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.2.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-I7GhwyTg18iy+76PofAD6jRFYvwIe3kqQKBZ5seQgNSJHd6QMkUO48gZ5MKey/ghyEAMNJZgeg70fLIVtfWLOA==","shasum":"bad7fe7bff1b29fd6ee28af2846d744d36160833","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.2.2.tgz","fileCount":40,"unpackedSize":61541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcwNGCRA9TVsSAnZWagAA+9MP/2xxOL4elCd0zq1O3gRY\nWHm0IgyKWqlFYsKww+2Sps/QV3VwZQ12xN1RAyI9WjdzJ6VKEXDsJrZ8Jcef\nQS6JtXBWKmqcdQ7X2xPXC4HDzgr7N60wPYxyksIfLgd429R7SHJiKL6XrMcN\n/bxNrzfsO82N5LIrzE1pl8oP0PgZR8Yq/gsDyu1EApgMuJz4OiPtkCmX0uBj\nF8fve2p20r5mAFCprN02cUl5WEW44IoG3zsn3mBYFkgSwyM7AskBx5M/v7PI\nO5WRd1QqI4v8gw/7XYbdGsgf6Xq8Uo6zN32vOOwgDa6RCDWOJ4uJofSzcge1\nRHzt+c9KeXdBizR7nQ/SIao8RzCRWamsBhBsy57+VIfF/JaDZZlZ5g5UtWbF\nJOKM1WOWMNzX0eq3lwl7HGqxmwJnaT5X5nmU3XnzAmxfooV/6FtnEdTaSRoO\nGNDMwKdqictybRXEHuTSKVsulPmo+aEgJ176qpntwbmqFCWYJbdgPDdaq1IL\nhVSnBY9JGSNjUR57+2UibebNBuMmc/iTSvKf1MlH3G/eOOjzUhDHP6zomDjs\nGBBra2URlPzvr2oKRePTD/dg5AANnD2TvHKZWYhlunynNAHIGbypLxv9XKAi\n4KLtofgKUIAnX68pM4qH/WnQW/iXB9lBORdxVLGzLjfrcE8527DZ6OZYEyci\nT3Vr\r\n=9WN5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcLrz1+PEWHl0uZYQqIWznw8zyvav9CXZJfJKKgT87dAiEA/YXbjQznPYixp8R0pOd7ZvRjM9oU3ydP9MqySLifabY="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.2.2_1601372997732_0.6944497006316082"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"8.3.0-alpha.0":{"name":"@redux-model/react","version":"8.3.0-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"8.2.2","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"df331bddfa50f133e583e7b39c8ec95a40b03a74","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@8.3.0-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-pxZ/4SN/cN2ko9seFvY1p98A/U273i0PhqlzV/auU4VjyuX4tTn8ySH0RN153DqqpcZ+gIr7vmdN9pOXbIu9ZA==","shasum":"96bed114bc9d90c65a7dbe2c0699f23724545047","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-8.3.0-alpha.0.tgz","fileCount":40,"unpackedSize":62486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc/3cCRA9TVsSAnZWagAAqqEP/2kFdE8tDeuEe+5HfkIX\nZy0KcCBDyoJ0Jhu8CixniFptsoWOnyAjlX7EoXjyLR50jKn3JW/Hk3fIJBgl\ng4vzenX8k0FVBvQDv7KDea4coJaQ/lrcK713nR0IXn0JotPDKYCyQpOctGk/\nnuzyuMcKsW7UkNSFzzQ+zcF4gAAYMZHAew1gxfGWdY5+iTfAlKQJieSFALPR\nRepQWv6nQX8U6noB94538ybcjUzYhQWBYruVvnvqkjYYFc3YSyCF4dJdH4bF\nWtgNhHf+3Q4pseHLR8GqOrGMsuCd7tDtZRiLBEGmjNjNPQj6wIFLi913/39W\nA1cVSS2CXpaYsNc9ZS5Z/yC2aajMo7R81Zch5PTigfO/XQrh5k5GL9TTUT9G\nJ7nAeISo7EdH6jqLmQxFA3DVUT3Wv4fL6pJBh3ngTRbOo+VA2NBxIiW8vidi\na6EwvC+z29Gyii0aBBNPmgFvfhxIUEJFlfrmG3qOfmrheBItQVKn8FRgLSR/\nR7vprlsL8YAUXwxG3VXdzCXeuyzcaL+vPwDJmcYqbZS1YLcBN0xFnO5WFzPk\nRYuUwVGeZTu1xpidk3gaq8idu2KljiezqsBpEksgcuyBF9NX+NGL8+Q8ykba\nPkOOotXBli1tCdoAh3RhxcW5u33G5oZEX7ONBTwponUBtU9G0+Mhi9+ueZCI\nI5ug\r\n=oQ0c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuaRLeCntmirSFgWAzdBu4VF0aH6wXOjl5T8kHKXkQswIgGODXlQgveFhk0CmzEfvIOpFDOoa2EMN3iy7MLVpi52g="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_8.3.0-alpha.0_1601437147766_0.3654621862699925"},"_hasShrinkwrap":false},"9.0.0-alpha.0":{"name":"@redux-model/react","version":"9.0.0-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0-alpha.0","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"8b541184d11fbf0e08fdfe5bd95e928021e34bc9","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0-alpha.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-veUFfvWZwn9OI6ptQ1pdzotf+dMFJej/5kRWIP8dto0SYdWFn1XTvp6sQengFyI5NoMNvutF4Bo1jx+oZz7FQw==","shasum":"60909a87c3e958aad87e8808a2c6bbc1e7358d96","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0-alpha.0.tgz","fileCount":40,"unpackedSize":62303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdCqACRA9TVsSAnZWagAAqOoP/1fvAcam5gzmK9ECbO7I\nKV9p29xahKZxR7QEw8tFwUn27T4D6a9rnXOPQvNL2IjQAbllOslLBlHsZJY7\nG6KgdUBLNSe63lQGQb/1kLH4KL5CQlZHqk81KfXQemDOVQE3BFHXsy/+3YH/\n/ZxO3G8+HcKVOge13tIijQZDshBZP6Kb1+aTRRruD9nBe4l5nSUvrlzd+R4k\nFYlPXUErN2n0zTXRj8ld9CbpLte1iNeQEqk9IfTOTM0jIdCKfDW2v3hv0QtY\npA7T2XH4+zIirhKsVFSDib9TmkKEoYcVkWyTIt6kum+5th12dxgmXbOImXmk\nBOZ/aNM4SXJqy6masqcvHFyRiIpjiGpo6pct2fY5pcNVvsr6dAZtt70WTPVc\ndme2ym2PmXEi0UI5c/Zv8uQhEyoclDCZ6LMy23FwV2D7cQio+O1jkyGVh2IP\n8aMz14LjKbyh30zy8KABTfFdzz9KbNbAJKPbcg7uMoABEIzgFG0TwLNjKbsS\ne70Fam+pCDsGPTJmV0D4mgP50qteidgtaI/ARkN4yAocCgiHcIX4vCYjwGCe\n+F7+hhaJa8bah5/X6IlPmPexM6HajqnL4BnI/YqJ7ycKTMGOk+50T7mELMRZ\nvH9nXWp59SuwwcBf7B0mfhx5VXEvA9l8ykzRiRfnrlcWB+KXLxMfKp+eTaUw\nw33a\r\n=xpnT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvJTT4ROK+1985710ueB7WFJNgu7GyT+LsJ+r3I0cvewIhAJyTkl51XgaikgEfoGH4OmG3ukiug0mCw/2sORBP+Xnn"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0-alpha.0_1601448576392_0.7827881644275603"},"_hasShrinkwrap":false},"9.0.0-alpha.1":{"name":"@redux-model/react","version":"9.0.0-alpha.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0-alpha.1","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"22bdedca6f34e19bb50e0204177e358b0cc81efd","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0-alpha.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-MZRhWFKPvA8eoTiT2mNw/tKNUAbSGI0z/ZJf52r3MEl4R4vqF0YPumiJyHWdXkqZPKT5+QMIzWPxcdBw4IE+5w==","shasum":"a7902065e5441568acb7a1100c7ea60a87625843","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0-alpha.1.tgz","fileCount":40,"unpackedSize":62570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdGWICRA9TVsSAnZWagAA5e8P/341tOiUpyOf158VYjxr\nh3tW+1syIikES7/6k81DOSFmZ2D7+Y2koGl2oyiOCOk48A57ejpFnb0vTxx4\nz+nkgRw7LPlxY1GhOrAuBGxKXRx8s1KwiYbX2QPGWwrBzjXRQZEKgeHvo/Pl\niFqi6wWUJnS1z+nb+TAtR2LzYoaKCeEq9MMnMbc5yCdWl29XWIuWEYqqHOiA\nSVM7ztvZCXHEjxLrRHoTFp5HF2nBvABVAQPmBpWc9qZAPnMLwCpBYHb5jJvc\nWHo7QRhiFtT/UN/gc2WCMAKmfC8uuVFNLBzi6Ha+M58YcOLvBQeNvwBlo08k\n+5CsMN4yb84ngM6/q08W6sTbDzG/7/nZhcVvOxcg8bOfVYInJFCJkoBv+m1g\ntiVnGAJGGXaRbt1jA2Jrph7EWkbCKT3SJ2gbtTfTKyr9ICtZaP9Ml6SMX8s1\nwHLEuef6tzo3gmKLfzr8sgvMgDdLPi7oSawiXIO0FhMO610GzltC3PxkHMDU\nhbb9elwHIWPQ8V0IPQMTnNqQI3uEviJj26SOm9P8fXtVeANhdCjKT1yrVvQl\n7V7YbYRUUzbzEx0gGoFMeQ8/T/7YzNbPg5hvWe8IIr4IkVxqYv4KG+vjmTgk\n+Vsi8vi1rY4HOqUsM0qISrawj+qyygM5W87cWghWo933UfGzfIdwmDKHcoDJ\ndQpa\r\n=PhB0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSLgsm61HhR92dUXsmuShsXIpaKuIWioWz/c4L6hbj+AiA5JoyAz/T8Z8c9Oa7aPRIEZQaYCGkhqB3hVbFvbyFJJg=="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0-alpha.1_1601463688342_0.6751566229326271"},"_hasShrinkwrap":false},"9.0.0-alpha.2":{"name":"@redux-model/react","version":"9.0.0-alpha.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0-alpha.2","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"4a29a1732782e6d3375a6c7325945e225adec19c","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0-alpha.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-F6+J/H8E0wP+5WYHPtbN2Fdy1I/q8VVr8EArV28hLKcd8+9VjFnQm0IFEbDooZug7EWv5iXYNjW1BKeovRG4WA==","shasum":"1b8f8aaa6e6606ff37ddd4923961bccc468ec4a9","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0-alpha.2.tgz","fileCount":40,"unpackedSize":62549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff99iCRA9TVsSAnZWagAA3Q8P/ibUQ0EVNUs0GqhCe1as\njmjhzb2AJj1T5i72GZ5J6YW+JAioA2b++HqZiF2Tyk9mR2khw1ZERHkwZsm5\n4/oiOSG2aQs7ZvY746xwipOsuHdGpv1tvWb5jg3cJZT6V288sV0XxocSYAq+\n6584+1Ya3NWSC0juFzBQVk18GGI2ME9FWkiCavg8sSwKuufORTJgCJFHEOjl\nb3udwcX9yGThY8EYlmIE6H3FzZ9i3M0hfpKcDykSjNmgkdd7AiyMDmGjkM5W\n9JRDk1flWCj6s/XeXwJWMes/nbv6YJ87+V2c0o6ehFCpvc4mFox1+OB4JRgx\nIZCmhSnQUjO42e6fLBVCQpp9j3Y6Eh5cgirAb58cNmxwAoSayzj78yOKsyr5\n8savlbVz8JC7ahqiYxOMSLMlAxkZTvICKcF2xhTM78Nn4xVl/sMgrq7ke9Fu\n1Je2d9aKzfRRAVWlMZXvLGIEqFPGtpHoVynV3R4p2Wyf8TYx6pF+gDhkjEPo\nCH9/zuuTdOIffrCjH/ytlJn749xFk9Zj0LnGDMKeAsjjSKQh30eKrDojzV9b\nF3uvgepHM+LpVj7Eem9Zc1wztCOsILwOKsnU2KD6REX/QBnO+yZbzbES+DBp\na1tThB5qDg4OfiUoU7+953ixgHyj1tOUuR2UiCAoGd2V68OVEtICK/wGs3db\nrqz5\r\n=DiW3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEh0UBolCB984adjIVddZ+/B6jdI9EkyLoG2/vxCoUceAiEAoZljf3Jn7OA4dpyw1qS/8D1RWRZHQLhUxjR8T51ewCc="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0-alpha.2_1602215777744_0.4267189625994474"},"_hasShrinkwrap":false},"9.0.0-alpha.3":{"name":"@redux-model/react","version":"9.0.0-alpha.3","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0-alpha.3","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.1"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"8964d3c4ead7b6548d4be4c49700c5c65410d392","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0-alpha.3","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-SqxVeB6BbZe2EGsVg0TnbcVZ1Yl7D+cTt05VmqkovvF4q/vhvRdUXRVj1Fte1DZZWt45o3vxqRjL24nFMgHUnQ==","shasum":"e6dde32e69f1437985e9a7a3d1bb785abc34a9a7","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0-alpha.3.tgz","fileCount":40,"unpackedSize":62739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/cTCRA9TVsSAnZWagAALqwQAJ2N/G4+7qRwxD/IYHgk\nCdBpuwpVjqA13upWoxrq0EbPYL1podaMTZeNFW6lsb+4m+0JX/c7tnmge+/W\nvr88PtTr68ctuK691/T+lzH5vYtDg6Zy3W3SEel7lf5uMWB5AHPhO5oo1zzu\nndnYFR4iinWZ4mGRxj16rsH1qrPK6BEUCh4FhJvX+WVrjf8oc9/GSPEkWwR6\nlPU6HfJhpeAjRYrMSFp5LKKx0sD7ltHiciunrl0VMZkqR90jnq5Ncf27lxFY\njQwJ9xOZhGSP/a5PN1FmQGKixmjfzHQxfgAq12HowE5r/QMEQl0V2avun7g3\n7QXFjg4W7VUPGVHlV73tVk99qBrYKxoW8g9JdgVjt25mFvIdDdX2sv3I41NP\nfV+nQS/+c7PKyGa2s3CdGrQRtD+Z6DGV5m67qHbiypgSYa+dMCLrQy8OhdSN\nwO2uo4uRJQ8AR/r8AtArs626B6rHqKVawHs2Kp4noXm5mcrqwYslrqrL2JUv\nf3t1IKfnc3TQ7WGwkbBdKrwK+yeK9eyaphqc/KAxPgeuM2vv5H1AWoXI39AN\nA9I/nEehnv7BzLpkK8dzoEioMebIrQbNteJubfJAWOfgkpwvj+twmtHI50Ef\nRDTruHenxpJgcDcWyULAw8afoo0wAuDKqO3GmywQ3WWbKxmcXECi/wIeS3w8\nzHaj\r\n=W9Ak\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0AEOt1Xd3Z/9c7BohKlZpbrULag4iwozGEsM94nH+RQIgfdMcObqxPyhLPZoYLDRN28gTSwsLfxIhfxEM7HyV0gk="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0-alpha.3_1602221842914_0.9063852197371418"},"_hasShrinkwrap":false},"9.0.0-alpha.4":{"name":"@redux-model/react","version":"9.0.0-alpha.4","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0-alpha.4","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.2"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"f148688b98f361d0f6491ddcc2d3513d1509f303","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0-alpha.4","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-rCOKe5y+cwm15E819qUFZvHOQbaCagRrrW8gW+szNmszHRiI36DUlKj0Unv4XYhRhIdoaoZpgTm+6DOuWL6vTQ==","shasum":"76e141f7e47255234d255b95247c5fad8c7276ab","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0-alpha.4.tgz","fileCount":40,"unpackedSize":62436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgDqcCRA9TVsSAnZWagAAMGMP/2CgF/ZKZFBK9sb209dj\ndvueMd+/YKhIr+9kCqW4AvCRA5aFPLYRA2mLxQeShIqvU4JZ6Aadj1sr6FzS\nhoZ4JGbTs0NI84wjV5sQzVcADnp1koQ3H1wUT25Vqlwaxb2CRH7o4icgBxSL\nJaowJXy0jKbytTi0vJ33yEZaIX+alNtj4LgCTnB2Mmbbh26Ipep4pkY4muEa\nQrJUIdz/axhzm4Q1JdazG3OYIzmo/DL5CtyaHl7Nw+ibVQQ0+s99Qk4YMZd/\nz8xxQyr47CxkSrYSAjO3xBalSb+cDI9uyIM+NuUx5gcbYPm52DDh+++PPf2s\n1dYkdJeVHywRkIMqHlvsgjm9YXhlfQpt/wy121l0y4UM2ehbjzITTyVa0vf3\nnSEc2AW95XCLjSuTCWnMnN+Bem53NDB4JjiQHCX20nJItS43FVX9EAO5gReC\neOjXkMjCyCwD1C2BNKcmTfbfxbpmcZGPBSWAv3I4KIOKAx6bSiwIpT+t9WSA\np59tvwkhihDDqpJsGDoyR56JneygYtMQRfsJGMaB7uU41q5KNTJeKk7oJ40S\nOpeyUXiXkjBL2GzSmxjCwH81rgym5uIFDv9R4dt6W5Zx5ZnbjOyHKtbmvVJj\njpBK3AU8TJpojoJ1LMKw9/g7sYP/5NvRXucuBJAG/vP2zsPfUYElHt79wtfj\n6KPV\r\n=S0C8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpMyUTcQGuboViX9ARi22VWEqp07mkACA1rwHQugV2CwIgWZvx5UnoKgpODh3ylWmlfbmUXHU5ksT7en4Vm17Eg1c="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0-alpha.4_1602239132284_0.48172858963461906"},"_hasShrinkwrap":false},"9.0.0-alpha.5":{"name":"@redux-model/react","version":"9.0.0-alpha.5","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0-alpha.5","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.2"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"92c1a803f5338e2b7b0e9ca34cbf8613da8f9347","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0-alpha.5","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-ngGRndGkcZhUVdYK/IwYu/0YAH21LWcCKXf1jX9AzUZlZD2ueTzkdd5ArCkIAVfV4f0VkC1Zpac3HJuG1kXOWA==","shasum":"e9216a26e8f7629a5f6c75b6dbe0d60a9d87b7e6","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0-alpha.5.tgz","fileCount":40,"unpackedSize":63507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgl/CCRA9TVsSAnZWagAAriAP/3QU2ia8kjt9d7YAG4y/\nT4jQGcgiZLTZZxM6wGDjnoQnCdH8vQ3jNs8J9uBrG99bs3ySRVceuJ7blrt3\nkt+mpoJMUkhT7JkWTMYVjF+/xohSwPPZ3aORHi6kDgl12a7kWNYLv7f3vVCA\n9l6oAQdwGKVpgXwem1R9rIBFX32012lH39OXJy/z28FQQMm5HUo+uKU73HCy\nxJ7Wh9xuF0UG970x+JpPRntfK22c+OvX1Gq3nv2oTcVNMhnP2/ixi5DeYBnm\n5iS9P2X+ndi0JvSi7g7+amuJkMvsVdJmqUZUMGm9+eEVtNzs9pO2XPVf8w6O\nHbWVd50xDZk6ykQEZet+PYseky3wz/uhnqLqOWiZ4x1q0M2pCsX7IOyviwvn\nJ5iroZhp0aIESwpIigqSmgzD47M3gZ+oaERAug+argtJ3TFQxjgl7ZuNJQU5\n0irYKjjPps7T9trekEEFqruXzR6Qj4zcQKtP4Qg5Le+UIV0XfMADefkIFrKV\nhNT4SEgWOVq1UR8EaeFAFKJM3qIvWr/HYJNnG5BxH5Xox20sQXmFU8VSkLUe\n62dCa6eRi5jye/qz+u+SzIVcw39KnWgSA6E4yVuyr4jPtthIZ+kfpTqIAhPy\nPdCULYod9r+3Hs3wkY+DaQj5aoLWFC1dDeF7KR3hLI+8BklDOaF8ROf1OW5C\nINNl\r\n=uHvn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSC28cFF12KXPhZKOs7WLUmnL3aK/cGmEW9g4Jf2xhiwIhANSLXPu4X/5eQRaRFc610dKOUUxe+Jl1S5zhf5owNAI5"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0-alpha.5_1602379713788_0.04403145451815127"},"_hasShrinkwrap":false},"9.0.0":{"name":"@redux-model/react","version":"9.0.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.0","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"5ed28ab95a8f32184046d8df52b0862e9119f2ab","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.0","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-vuv8/wGaY/Q3AeWy1XjtWMXRFVhrVllirf1vrXT3RV3YJ7F0agKfjuXuYPDrp/68QCOVw5PDkd3/dLJEnHXUiQ==","shasum":"6419d0d27618f51ce39a0a71a1f1f505846f5493","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.0.tgz","fileCount":40,"unpackedSize":63634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkF6lCRA9TVsSAnZWagAAuX4P/A5UnFUvEWf+9BPNq79/\nhPXTRLE862cMLszpFA1B38Lf7S12EU9zXkFeuA+RJz4T4GGYvi5ERx40Ubek\namDoW48zxDp+nv76SA8uTduH9HkdK8LHQbAhGVlPZhOQmu3GFHdfDhUO2UqJ\nTaRKrAd1tK7oLojqIf9ytJz+SVIJt46bOePP+E9Og0EGRGzLOQdxuLp0XC7C\nJRz9ljmaoN/9+I+wsKdYT6jyZ20QX4Y8BLTO96rfEVvPxnQWR8PUViLb6HfB\nyqhO0gkwfTlCiAIYmSaWjv5jTdpNx+v7c4dxI+zpWxPcX+ZA9LKm+Cr6xb/6\nL761NhLfUroaaLnzM+0Ot1N+YwXLQiEdFldjH6BQsNUOapd6LTe2ZUhIfXMr\nAuHsFUSxcsF0WkqKJtpWMEiGaJrh1X3e9Dq6NXUaIbQwScS+fWI3BI4LiIbB\nStyIqqyH0RBeP6u4GiRsL9W6XWK317W7+IqD/Qe9LcEK9Cm2orCzibCsr9m7\nA/MZ8vsJsPCuC2siweV8RCJjMZ08wjTYiqpfW8Ayi9Rz5S0m5kEl5k0QCllZ\n+UaPOrydJTpBfKiImU5INoi+DBMvPMuKW3TJtyPSdaE2sEIXM+GOeUPjeJd9\n2vu6pJb5ETe0QB4hhRpgJ1i+325J4l/ZYb+cSF+jAbFa0tRCZJAJaCC7cRgg\nd6E8\r\n=p/ri\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvIuxJX1PX1OXBnpjKfkxJGDvEW0UbbU8s6ca7PcrKJAIhAKbKkuYVEApvhr88kGgJNOziTNGD4yLw9JaSHnsC7xz6"}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.0_1603296932904_0.7447881242255734"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"9.0.1":{"name":"@redux-model/react","version":"9.0.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.1","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"64cdc5e38022304ec8f545f8bc8b9b8c2e2829a6","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-CX1PgPnGSwTiEKfWUNHEs723HQgwT/NvcBK6JzSikBDQE62COgpEt7e8qawoGWx84LZIEujZcyMjiUT4uE1m/Q==","shasum":"67fc304ddd4f3b10e5fe5d90d943be253e07e951","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.1.tgz","fileCount":40,"unpackedSize":65035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnjX2CRA9TVsSAnZWagAAxv4P/3Z147tVPbJoq9DF6Lq6\nBYGdmSLME+6+Ior+S+G7H7cH0y9ZYnyshujPbvQJpluYfHlj1qG8c9KBw7By\nXBCHMNpcL25f3ac+4GJLNTH0FaHU4xAGMJz8gn7LPM2kMRb0iwd7gBuumI96\nEWY53UpNLwADAJPbol0zUK1j2mjZk2Pa5Dwa4vrseY3K/mwXJEXGZFPXRIat\nupRlyNYcd+HKvqZPbCIjbw4hSSdhkHc8U64yLsxlOPZ4FQTnHAJTYoc47mRi\ntsIau7bAAmF72BHrQrgvQJrF2+FbUu3J9xlZevgIPh0xKuLgJ6WLCsEB1Low\n/bWH2xFJ2PJ61y22XUeq9hihqVCEsXDEca4GL2/mpn0CKlRveb6OFgzkvXdA\nIpL+VuQILslLQiNh62sYgff4mWJ5yigtAyYMXhmEVQMD4Egxv0BzMcVc1sL/\n5ktJYPGMJIDHyDvWvWg6GdITqwUVbf3FZhQA+7KgHHhkjSpv7O8wlSjMKcuh\n9lwHb8gR14DkDGaND7z6rIurJ28OfFBNGuhEOhNBjoZqMpDCqOx43LT2+IG9\n2PESaqvJCW+L7Huz2vEhbAwd1THvLmPRvbZVWTz7tlD9IPr0/ue2Blrk/177\nmv2hHZWPOpubapb4tnL/mCuDli04wNyqbqVrbC438JT8zNMLvjglHwm9OYUz\n2CA2\r\n=NYOS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3NoID5cWZBqo6ViL5utl9UcR9UH/heQGANMHOJu3j6gIgKBhGXhdXEWlnNYyIN/nesOxHEhxz2NgmvQCnyhQ7jsU="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.1_1604204022307_0.2775986878182737"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"9.0.2":{"name":"@redux-model/react","version":"9.0.2","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.2","@types/react-redux":"7.1.9","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.1","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"fbaef786fc41954f9fe6f9dff0e1c81d1c985a4f","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.2","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.1/node@v12.17.0+x64 (darwin)","dist":{"integrity":"sha512-EZpB4cAJ+xf0nLOvMBdr4GferJrqGC9WchsAydOoFeNSSrjlfPMOHB2GmwQBS8tw5nXPv7gR/utEWu7W5AQPxw==","shasum":"531c84dfcbbbdbe689fbb4cfcc6bb596aa9f98a5","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.2.tgz","fileCount":40,"unpackedSize":65081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn3mbCRA9TVsSAnZWagAAS9EP/ip4gQ/ZVaPcisfk0CW3\n61C0+j8KoPapBwsJytpPPJG5RaDOEjE8n7YiBu+1O001p8oeu30pLKh871Tv\njZ9N6fnkyYVsHl39aUxpQ3TOrw+fdmFa9m+Lcw/tEsUJqxq3o8EbmvY2aV1z\nNqqkb7V6vlGJEK/i74qQr5geSFYFErV0MYEpZCJ4xIiZgigCVofcMaBtjwbl\nmvNQE1u97ofbY0aKY3cMdRW5FHwWjRoy88xSVgg5iFHF6NpYKQZCIpHy0V8R\nFaX8Sdgzihr0lx9uCAyoiezX6iv/uXkh7xjjGUvIXMvGVbyilofYbyY9wWNb\nXMG+ihS+YYoIrS2kK5b6/PSfxCJOD1mngdRLe6JAwxB56PGd7/xvvsH4vCWy\nncgE+6HkTDVQRb/BTZ3FDa7F+//pMIW7dbECbvpcFteBqXh7ymQwdjpvlJ3t\nK67w0L3tzrmKFid3uSbkDoe6bsO1LQoj5At2jlau6Vf64wVxQ8kApd+EOXsI\nJysrzqVI/+383n+YLspnfb0EYVLplr7sUi4T61blawHR38LNgLxTH7iVd5Rr\nUQ2kxQwRC4vcrHKNUmp6n6bpHEpfMv5dn+koFyK+7l52VK++20nkz0rGO1VG\nyWQ2RCwqWjQ78NnCZL31foLOhwfrHiH13CrJPzQovvEZbN7DGlJNfNG5n6OX\n5NjP\r\n=LpdO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPZftF+/ziFmSbb1lW2oDnMTMwz0LgTbBa4dLDRPg++QIgJKiyFk9QdbndNpr5NnZE7MqC1dMlzOtx2iZrTxQRXIA="}]},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.2_1604286874631_0.7638811211958263"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"9.0.3":{"name":"@redux-model/react","version":"9.0.3","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.3","@types/react-redux":"7.1.11","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.2","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"5b8f3c52f0e40e52c7405eaa50b16a3553bfe33d","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.3","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","dist":{"integrity":"sha512-7aoO9lfAGHMMBKHaEYmS37jmndIuD+IlLaaaC2WJ791XiHiwgUCQLtOqqvV3O+zjKtYiHP8TzSFiN63ZUgr90A==","shasum":"57d13dc2da21596fbbfd7675233dce8c0d54d594","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.3.tgz","fileCount":40,"unpackedSize":65321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzwziCRA9TVsSAnZWagAADsIP/2t1vThWygOpvOeTcqyJ\ngscrmiAsDiEtJPoT3wYRiIELubrauMPAEEG0N2KoAdeeAH0ZfmbUqYCMm5pt\nq/jrn/QtNgGn5iPVBXrjciY2I/qmWnHKcY1o1nXgVE893xUY1Z/qqoPycY3T\nZDOT89ISpweZyYWohgoTg6ASAYFUCvrh2+BN6wyJLoWBAIdCeNlnQw+ncSJC\n0W3CrIMKEh1vh0bvkIzhm0ejLbbCgKAUIHEk0imtfFwE1tl5ucHttfs6QWc6\nXrsD/wEz2D937ZxAJ9u1eaa92wP+qaZCHII4LHESJzeOQHs55zpcfDXWPtTV\n6omMHS7rWNl33VIqMA+3OYDECJnGA+2IK03BcIKUgnMVgKxrjUlQLZYNtGcy\njdac/iI+ZeMJVP8neCND5faBv2D2xvFUxtNiqEjb0xhW10iqE6zUYsgx9bqG\nZVU5jzmVJ1qNoGhyXE7TJOWLBN+s08VNy7Y2OB5j2RCcrFZpBC+QjqU3Gkgd\n62Ezp1NFaWUzcyX40RNEqb0OLRtAqem5PM7qpmPIeawRPJXksUsAlUGn2K9O\njG/L8BdW1s9lwJPAasVLFBOihxmOfImWj/gq1gA6YmXiKsUJyJwUVGOEbBm2\nTmMGKkP/5YuADHlzYJc6pp54EqnWVBQRbjPMC63RosSOCk98Q16/qMFexoNN\n6qeV\r\n=CRGT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+jL6W4bR7/d/Vh6765HtW+1bNcv7isxxXhbDaLTkjmAiBRhNhnrRZo4L6ME73Hc+elkOwSWGy356tUVa+jw+AMQw=="}]},"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.3_1607404770173_0.36265685114388857"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"9.0.4":{"name":"@redux-model/react","version":"9.0.4","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.4","@types/react-redux":"7.1.11","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.2","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"0a5635e444586acb0975b62ec6b7ebdf054d3c54","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.4","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","dist":{"integrity":"sha512-7uZhJXQjwFAnDUQ+Z1kM2ZVAwi0ozSdyaWcUU5xw8w6D9miCRDBjJtYesLfccG7DrSUTpSGJXo7VC8qy8Lzt2w==","shasum":"dde475a8f7b886bc49b9f0f7a96ac6265af8d31b","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.4.tgz","fileCount":40,"unpackedSize":65386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf10J/CRA9TVsSAnZWagAAkFYQAKC4h73cFFQE9TvctXzJ\nTfzelIHC0mfTa73S0lENhofDsAki5MwnZ1q/egYBy+5aFPrXuM30eAChoOTi\na/ICtOHhPsIuvFCKXs0CSM0FwcomBnTg+wqcX+GSKHPWU4tnb9VEy2xzTH6Y\nej4WkaRE7qBHIcvZYhVQsQJUQQPrU9fAxcq9ULZiJ5Yra5X9IWnZUM0SVifq\nF5SxHiZDHFyyJDWs3fqhNHViwjDyDQcjVcO3phQL+LzakLEz5pSdgtY+kWEc\nF22t8Dy+MHhjhNSaiSthUtQYVcHd+xY4HRLeAKRN1VKw8Ng+Ue/Inyq/7hcM\ndTkSqP1kax/0hRfT2tHZjR+Q0qmXG6LC8DmnsC2Xgpt9i9JKa0FXkVAe7KYY\njAIIr+kweRG4H6tin0AhckcbeC9pcGnYLijFGDsobaVYSUzICWVS2LogVmk7\naNhVGP3fabYWMBDm/l8pHTqR9085EwtpWx5BpRmFe3Q6FKTfx/Lwabd/+ZKU\nKnguDT7Lceu7SS92ha/s+/JhGDbC/7kueGmAByLGwnh3Gyrt0IvzwKJdN+3t\nzHMVroe33eCN+GUr98umPfUQToN8s2GcLiMBdN/AG94gDjtvBkPHuN6Dwqwt\n5I2UCK1fZTAhfp+NY9zge9zuP/+TObCEc6M6QmojX6ES4QvPIr9+WQYKhywk\ntJ8a\r\n=wpHI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8EnML8YwSNL2ZrxlIf3zcspa+SR++UyfWhlYmk2a+gwIgMbjTO3a67uMU9CdgzG6dv4RsLV5eXAowM0qsIdUmQkQ="}]},"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.4_1607942782502_0.8040324456588075"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"9.1.0-alpha.0":{"name":"@redux-model/react","version":"9.1.0-alpha.0","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.1.0-alpha.0","@types/react-redux":"7.1.11","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.2","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"c090b08f4b5b57a97c9126e84a517e4aeb249457","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n# 本地开发\n* git clone 你fork的仓库\n* yarn install && yarn bootstrap\n\n执行测试用例请使用 `yarn test` <br>\n修改在线文档请使用 `yarn docs`\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.1.0-alpha.0","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","dist":{"integrity":"sha512-Wng2QcOGZPBTXVQ/I0gerk4hXC0MqMjMMM19MkDeBc7q9qn17oZ9EPWshq6HNs2z8eBjt/9CLohKV/0mM7Oj3A==","shasum":"3b818c57de07008b602a63af23804c56600367e9","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.1.0-alpha.0.tgz","fileCount":44,"unpackedSize":67358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4XssCRA9TVsSAnZWagAANt4P/RjQkmY18ISdByxAmiZ6\nXSPJWEDwooK2H3KIS/rb6vxulWQdI22K9KZLg4W+MkyicE++NLECrtcU8Z8x\nK8VCkyB28oJZA68p6Vl3ggx+6IozKOwnlq3ySA/tVSlllK/1B+O4Sp3zaebm\nQlFXzfGUjkCMcuiqotPZinW+cR29WG7WCPw8bmZtS/7atWP9EM+QI9gK8jtE\nj/EwZd0G1yF7mMZWCLHgdGlGO46JZ5NjUBl3ycFNY+9Q7vFuLK3crDfb3eP5\nLnkZ5ihXps26f6FkTQS5OaXUA83SiQfXBWPtldb7n7qPf6z5I7mFUy8z0275\nEhX0PZudyTyNIdCdOUqCGndUjDpGA+I9gPDXQjCs4c3ygVSeMxu2p4a6ccLm\nR5VHfkcFL9s3yiXO6+zzVstBxu/H9Kwd3kUOoDGmuLFd27NQQh1kZvYEpuH8\nlwQGN5Y07XloIfXmM7v7Na2BrrHHcKeUK+j2wKBPrP9x2I/bbWnTbK3u38jJ\nKX4+llv7qF1jvHaFXFCcpbkjlTZUHBOeBvoiV9LNVoelJ6MGlnf0dzFUJBFm\nuCU+uH3SOoTthWHkydmmopiM4yUVXc46vWef6tlbtQdyx+SIHs264UZ1Jh0b\nGReMC7xYFMPGeLkONOM+XfqwtnJ3lb0PzJSb/N2K9fnWMzUZPg957JUYQCNe\nBHe+\r\n=TQUv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICcY/sWGvInHf2gWCxmjuAPi8wZ7hF/pNh7hPI7L23OOAiEA5f3bzgqkwlMOGcGDErIfiQi9OQp9EqLCp278fpuwxBY="}]},"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.1.0-alpha.0_1608612651682_0.014148055943832505"},"_hasShrinkwrap":false},"9.1.0-alpha.1":{"name":"@redux-model/react","version":"9.1.0-alpha.1","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.1.0-alpha.0","@types/react-redux":"7.1.11","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.2","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"13f20b74db312d0a03493240f8ca3ac66e5f72c4","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n# 本地开发\n* git clone 你fork的仓库\n* yarn install && yarn bootstrap\n\n执行测试用例请使用 `yarn test` <br>\n修改在线文档请使用 `yarn docs`\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.1.0-alpha.1","_nodeVersion":"10.23.0","_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","dist":{"integrity":"sha512-K/6/gvDUhS+f4vzJOdrLg4TYAAkLaVcAW7noUXNfnoBMA+1ImFf7iY1Gl+A+lphbGpP7mipDFmzHpjhYzkPnWQ==","shasum":"028b3daf3d103d116ae9161c6ee8bf5f7c1403fe","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.1.0-alpha.1.tgz","fileCount":44,"unpackedSize":67734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4XwKCRA9TVsSAnZWagAAe+cP/RUBYijQrwbX41QY0pcm\nK8bpwPgpjOA+IWRwh8/zzjHIDQ0LJHKPL6TX2jh0Pv2fAIgUZ7K7NhiN15lG\nkhu2BX9cIjCDI/xd/CxMIVhOmJ+raV0vDGLHf2PPe5hLVi1p7mHqN0Ay8eiU\nREh9xBWpbSqxuwiXZpptf5o4onDesRYw8RfvWI3pNHYOSCkoPsmQsML9qpVH\nfV4pDVYdUGo0i6QzPFoGP6/uVlQrgXtiOB4CAnxLLPh6flfwgnDr5bszu4QL\nAozi/hlfQGWv+/L13ayZHmk9sqUi5DR2rTOM4IJCvmyMVwxUcD8VQyVPiwPf\nlhURqy4KhjlnAEg7DV+MwLbTbI1D86fC2wB8AMm82Fzpclc1WnX208iUYII9\nAmZ+Qn6sBKnvLkEvo76QKtZd3E87dCAOobCJkZ10inTDd3UNerqwkuEHf5Jr\nrYrU4j9Y0pQsVZv5W2Z2cbFjJI8GaiMJTEpVr8C1yoJlL81x3IT4ZY/Osd+S\nYTGJo1rt0KqP/Nb7dGzrg95RN3G2Gn2bW+zx9I9yBz2bGi2wxhgaPL1ARUTC\nF1lpHulOa0SGySYwor4WtJII0HbBhfrCbrfvlWsBN9YkS8t3kLcDAcg/WgO8\nJRf2p+8DK8y6yv7hHx3C977k0Z8gWrHKt9+LkhRAITetHB3iTHfik85eGs4G\nXm3V\r\n=EZ91\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHPBESCpzLPm0wQFnp9dFkk35u1YgvXws/OkF60X0wZnAiAlV0vCXDEJij9YYwu0BypsJIsJ+pSeE/ZwOkuybtDPiw=="}]},"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.1.0-alpha.1_1608612874506_0.8067013951233075"},"_hasShrinkwrap":false},"9.0.5":{"name":"@redux-model/react","version":"9.0.5","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.5","@types/react-redux":"7.1.11","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.2","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"cb39d74a61a5f82a310b9003b9d9b75a129565bd","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.5","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","dist":{"integrity":"sha512-QKDqvJCasdAlqnfaqRlFuZqgOdMx7Gu1FieTIxRG1Mjxu1mFFU86FYX0M2adZN2BMDdE+QHsPMygnAHCoh/IfA==","shasum":"677ac714c5f2c4014a22eedafe1c0d48e9eac7cc","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.5.tgz","fileCount":40,"unpackedSize":65564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8QYKCRA9TVsSAnZWagAAG4kP/1wEDV7wLx/kXuf6mWWe\nAqYWQUd3p6RNfKRE0BiO+sMUwEMmw66ZRhiVYSa4BDkXyrONwNqmlGPxv0IG\nNnE7TSxypRFIe3DgE83hK/18+p1XAh0OeWHU4lOodmQ415Qav1uCmO4p3prF\n3ciKC17wZg9SziQXPpkZ5qS71ln1DO1MUvygb6ned9Dfi2CaPTwqg7KIO0kX\nFY6mFIx+qkDLEUl/erip6Z3C5FNYZsyQnI8OXqBrPQPSbBTAjHYXuSZlplU/\nwB6CZ5DqWnNbto+iDPHldaDOVUFOJmAeIY0ApP4XifBYzlpGnLQ+yCIjLY0M\nzO6EgQ2YmBnOadFmyMVlG9qBgefRM42dBMaFZocSe2+7daFJyyY1xfdDF78Z\naB1PePZVNfu4HjXm298pIYBa8K0JYwC3iKjXqxtWHDEPpuiPxeSMLIq+9t46\nuPoOgBct7nud1zBJtkdTJbNlLUVrSN82lBXe7yhrdZmOFqRL9mGYi7v3Tprg\nV2X+yGuQqhCnYIfvlKF6+gLfAxSXcEMg4O06/79OH/XICwmyN7/FTopVXdOG\n8QG8HCZgmRMZ9+WH6rz7AoZ2S5NpFdVYqiI42MbBzv7nkjmADPQGdQ+WgKOw\nGcH36ModkiGDqQOOpjCaKtkWkNzCsrH2wdtiCDU8U6MZnPmZTJ0+WGL8ibdB\nz/JR\r\n=/SZe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBc2X1xKqp1o/KHOdqX3wVh5Y5qVT2zFkE/4Y0rvc5zwAiEA+bXrloTrJoFoMlWlaoSVvZrcU2Oyw76qU2f7kyxKpkE="}]},"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.5_1626408458154_0.24263191127571027"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"},"9.0.6":{"name":"@redux-model/react","version":"9.0.6","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"main":"lib/index.js","module":"es/index.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"license":"MIT","scripts":{"build":"sh ../../scripts/build.sh","prepublishOnly":"yarn run build","tsc":"../../node_modules/.bin/tsc","relink":"bash ../../scripts/relink.sh"},"dependencies":{"@redux-model/core":"9.0.6","@types/react-redux":"7.1.11","axios":"0.19.2","promise-listen-catch":"1.0.0","react-redux":"7.2.2","redux":"4.0.5","tslib":"2.0.3"},"devDependencies":{"@types/react":"^16.9.43","@types/react-dom":"^16.9.8","@types/react-test-renderer":"^16.9.2","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"publishConfig":{"access":"public","directory":"build"},"gitHead":"1ceb4ebd21ecd4718d2255783a85833390e3ce6c","description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"homepage":"https://github.com/redux-model/redux-model#readme","_id":"@redux-model/react@9.0.6","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (darwin)","dist":{"integrity":"sha512-aLlqLnK9PMwB3rn5ijGoeETp4TzblPwYccCO6Buf60g36IZryu40TIf0XptKNr9jMLNnk0pVqIXBaWKRPq37GA==","shasum":"903018a3d1945cc20a4f7291fbf50873ab9230b0","tarball":"https://registry.npmjs.org/@redux-model/react/-/react-9.0.6.tgz","fileCount":40,"unpackedSize":65560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8STqCRA9TVsSAnZWagAAyMUP/086jwkxRy2tbqkFMVFJ\nj8JycoN2dw5n5avLqONE2TlZ4CKIruFnxTenNMGrH2A2TQMJhFFwlx9BhN8V\nmQ8F35rZ8iO9pd+FOwcZDPvnIq1XD1+UYW+sOJOtgCboxWxZwi8llepspq28\nyAJwNdm1EBXK/SlTzLuGhv1MhnX52PcsZSPdAUWIuvccpq2PLTHq8qDOW4r4\nVuSNGmwyRij4Zfa/wCQgqykcSmyiWwaS0+FFjr+jxAofeGIojepCl0i/UK72\nnfetjgLiGjh4BuiBmE+gxOdD2JfNK2J4LoxC3jUwebiR8DLIXZ9wHHdcN1Gh\nH8x2KNMPhK1cgh0vq1dQR5/ENm+3n8dOGAzMNDAEtpTxc4n0nhCj8R1eLDfC\nNR3hLApIObtAQBPQndcatHTxitKjm+EgkaN820307eHnQrd78kaQl55DcX8L\nnMzuoWX6+UiuxJ8WszhXsf6xafboxxQXz/mwQfynzhlqOZxCP34IFompKBRD\nZxnkR9+Lkxhw1uSeJrtkGynN36RiPlAPV+hthNRPVYUMQzUrai5t3th4fhzg\nUb7+Ba8SXsX5Uit/xBXYaWCCAtikylTHw1ZDUkUMTPjJDYCUMI9jpyNF2QmM\nlo8LWnw9DgvB7Bmdwo7FwEYjegzjKs5ruUA0AO8D0EmDjHBVptejJg6edCLg\nfs4X\r\n=T/k6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjd0VQG75W0NN5/9r62dC0oQodBUB2JeBpp5epw06s8AIhAPco43hWcw0doACdsBa8X237RjpI6MSuaE5YNXnoS1fD"}]},"_npmUser":{"name":"fwh1990","email":"531362022@qq.com"},"directories":{},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react_9.0.6_1626416361936_0.2930112332602659"},"_hasShrinkwrap":false,"deprecated":"Move to https://github.com/foca-js/foca"}},"time":{"created":"2020-07-14T06:41:57.460Z","7.0.0-alpha.1":"2020-07-14T06:41:57.963Z","modified":"2022-04-06T18:59:42.040Z","7.0.0-alpha.4":"2020-07-14T06:53:27.837Z","7.0.0-alpha.6":"2020-07-14T07:13:23.020Z","7.0.0-alpha.7":"2020-07-15T17:02:07.288Z","7.0.0-beta.0":"2020-07-16T03:53:54.388Z","7.0.0-beta.2":"2020-07-16T10:27:06.719Z","7.0.0-beta.3":"2020-07-16T10:59:11.381Z","7.0.0-beta.4":"2020-07-16T12:49:33.132Z","7.0.0-beta.6":"2020-07-16T14:49:33.024Z","7.0.0-beta.7":"2020-07-16T16:12:12.663Z","7.0.0-beta.9":"2020-07-17T14:29:41.597Z","7.0.0-beta.10":"2020-07-18T01:59:36.761Z","7.0.0-beta.11":"2020-07-18T02:34:17.600Z","7.0.0-beta.12":"2020-07-18T02:44:17.914Z","7.0.0-beta.13":"2020-07-18T14:51:35.707Z","7.0.0-beta.14":"2020-07-19T10:35:28.911Z","7.0.0-rc.0":"2020-07-19T14:08:10.342Z","7.0.0-rc.1":"2020-07-19T16:38:45.878Z","7.0.0":"2020-07-20T02:06:57.431Z","7.0.1-alpha.0":"2020-07-27T02:32:01.827Z","7.0.1":"2020-07-27T02:57:20.196Z","7.1.0":"2020-07-29T06:18:23.024Z","7.1.1-alpha.0":"2020-07-31T06:18:22.484Z","7.2.0-alpha.0":"2020-08-03T02:07:05.205Z","7.2.0":"2020-08-03T12:31:30.665Z","7.2.1":"2020-08-05T02:00:09.078Z","7.3.0":"2020-08-05T05:31:21.154Z","7.3.1-alpha.0":"2020-08-10T03:07:03.693Z","8.0.0-alpha.0":"2020-08-12T06:40:32.667Z","8.0.0":"2020-08-12T06:49:14.456Z","8.0.1-alpha.1":"2020-08-15T17:03:22.832Z","8.0.1-alpha.2":"2020-08-16T03:31:08.819Z","8.0.1-alpha.3":"2020-08-16T05:17:53.450Z","8.0.1-alpha.4":"2020-08-16T06:09:58.802Z","8.0.1":"2020-08-16T09:06:46.790Z","8.0.2":"2020-08-30T01:21:17.489Z","8.1.0":"2020-08-30T04:27:17.034Z","8.1.1":"2020-09-11T06:18:25.381Z","8.1.2":"2020-09-11T09:56:55.855Z","8.1.3":"2020-09-11T11:07:16.943Z","8.2.0":"2020-09-16T15:27:38.685Z","8.2.1":"2020-09-23T15:30:00.747Z","8.2.2-alpha.0":"2020-09-28T11:14:12.194Z","8.2.2-alpha.1":"2020-09-28T12:43:56.715Z","8.2.2-alpha.2":"2020-09-29T09:27:16.720Z","8.2.2":"2020-09-29T09:49:57.857Z","8.3.0-alpha.0":"2020-09-30T03:39:08.035Z","9.0.0-alpha.0":"2020-09-30T06:49:36.508Z","9.0.0-alpha.1":"2020-09-30T11:01:28.483Z","9.0.0-alpha.2":"2020-10-09T03:56:17.907Z","9.0.0-alpha.3":"2020-10-09T05:37:23.083Z","9.0.0-alpha.4":"2020-10-09T10:25:32.392Z","9.0.0-alpha.5":"2020-10-11T01:28:33.892Z","9.0.0":"2020-10-21T16:15:33.045Z","9.0.1":"2020-11-01T04:13:42.455Z","9.0.2":"2020-11-02T03:14:34.744Z","9.0.3":"2020-12-08T05:19:30.290Z","9.0.4":"2020-12-14T10:46:22.708Z","9.1.0-alpha.0":"2020-12-22T04:50:51.893Z","9.1.0-alpha.1":"2020-12-22T04:54:34.619Z","9.0.5":"2021-07-16T04:07:38.525Z","9.0.6":"2021-07-16T06:19:22.063Z"},"maintainers":[{"name":"fwh1990","email":"531362022@qq.com"}],"description":"<h1 align=\"center\">   <a href=\"https://redux-model.github.io/redux-model\">     Redux Model   </a> </h1>","homepage":"https://github.com/redux-model/redux-model#readme","keywords":["react","redux-model","redux","model","typescript","web","h5","html5","browser"],"repository":{"type":"git","url":"git+https://github.com/redux-model/redux-model.git"},"author":{"name":"范文华","email":"531362022@qq.com"},"bugs":{"url":"https://github.com/redux-model/redux-model/issues"},"license":"MIT","readme":"<h1 align=\"center\">\n  <a href=\"https://redux-model.github.io/redux-model\">\n    Redux Model\n  </a>\n</h1>\n\n[English Document](./README-EN.md)\n\nRedux-Model是为了弥补原生Redux繁琐的开发流程，开发者重复劳动效率低下，模板文件导致代码量臃肿，以及因action和reducer文件分散造成代码追踪困难的问题而设计的。\n\n[![License](https://img.shields.io/github/license/redux-model/redux-model)](https://github.com/redux-model/redux-model/blob/master/LICENSE)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/redux-model/redux-model/CI/master)](https://github.com/redux-model/redux-model/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/redux-model/redux-model)](https://codecov.io/gh/redux-model/redux-model)\n\n\n# 特性\n\n* 深度封装，模块化开发\n* 使用mvvm快速处理reducer\n* **👍真正意义上的Typescript框架，写起来比JS更流畅**\n* 内置http服务，请求action自带loading追踪、数据节流\n* 支持React/Vue Hooks\n* 支持数据持久化\n* 支持[Graphql](https://github.com/redux-model/graphql)请求\n* 支持代码分离\n\n# 安装\n\n### React 或 React-Native\n```bash\nnpm install @redux-model/react\n```\n\n### Taro\n```bash\n# taro 3+\nnpm install @redux-model/taro\n\n# taro 2+\nnpm install @redux-model/taro@6.10.0 @tarojs/redux\n\n# taro 1+\nnpm install @redux-model/taro@6.9.5 @tarojs/redux\n```\n\n### Vue\n```bash\n# vue 3+\nnpm install @redux-model/vue\n\n# vue 2+\nnpm install @redux-model/vue@6.9.2\n```\n\n# 定义模型\n```typescript\ninterface Response {\n  id: number;\n  name: string;\n}\n\ninterface Data {\n  counter: number;\n  users: Partial<{\n    [key: string]: Response;\n  }>;\n}\n\nclass TestModel extends Model<Data> {\n  plus = this.action((state, step: number = 1) => {\n    state.counter += step;\n  });\n\n  getUser = $api.action((id: number) => {\n    return this\n      .get<Response>(`/api/users/${id}`)\n      .onSuccess((state, action) => {\n        state.users[id] = action.response;\n      });\n  });\n\n  protected initialState(): Data {\n    return {\n      counter: 0,\n      users: {},\n    };\n  }\n}\n\nexport const testModel = new TestModel();\n```\n\n# 执行Action\n```typescript\ntestModel.plus();\ntestModel.plus(2);\n\ntestModel.getUser(3);\ntestModel.getUser(5).then(({ response }) => {});\n```\n\n# 在 Hooks 中获取数据\n```typescript jsx\nconst data = testModel.useData(); // { counter: number, users: object }\n\nconst counter = testModel.useData((data) => data.counter); // number\nconst users = testModel.useData((data) => data.users); // object\n\nconst loading = testModel.getUser.useLoading(); // boolean\n```\n\n# 在 connect 中获取数据\n```typescript jsx\ntype ReactProps = ReturnType<typeof mapStateToProps>;\n\nconst mapStateToProps = () => {\n  return {\n    counter: testModel.data.counter, // number\n    users: testModel.data.users, // object\n    loading: testModel.getUser.loading, // boolean\n  };\n};\n\nexport default connect(mapStateToProps)(App);\n```\n\n# 在线运行示例\n* [计数器](https://codesandbox.io/s/redux-model-react-counter-zdgjh)\n* [数据持久化](https://codesandbox.io/s/redux-model-react-persist-uwhy8)\n* [TODO面板](https://codesandbox.io/s/redux-model-react-todo-list-zn4nv)\n* [请求](https://codesandbox.io/s/redux-model-react-request-1ocyn)\n* [请求节流](https://codesandbox.io/s/redux-model-react-request-throttle-77mfy)\n* [任务监听](https://codesandbox.io/s/redux-model-react-listener-p7khk)\n* [任务组合](https://codesandbox.io/s/redux-model-react-compose-42wrc)\n* [子任务](https://codesandbox.io/s/redux-model-react-action-in-action-oewkv)\n\n# 文档\n\n请点击[这里查看文档](https://redux-model.github.io/redux-model)\n\n# 本地开发\n* git clone 你fork的仓库\n* yarn install && yarn bootstrap\n\n执行测试用例请使用 `yarn test` <br>\n修改在线文档请使用 `yarn docs`\n\n---------------------\n\n欢迎使用并随时给我建议\n","readmeFilename":"README.md"}