1.2.3 • Published 3 months ago

@dimjs/model-wxmp v1.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

@dimjs/model-wxmp

the wxmp based state management of @dimjs

The usages

$ npm i @dimjs/model-wxmp

Features

  1. Full models api supports includes: actions, getActions,getInitialState, getState, subscribe, unsubscribe, useStore
  2. For big performance improvement, provides differential state data for setData.
  3. Share $models for multiple miniprogram page
  4. Shared the $models for Components Page
  5. Miniprogram Typed Api connect(models).Page|Component() supported.
  6. The detailed examples for full scenario .

Notes

  1. "noImplicitThis": true,
  2. In order to generated index.d.ts using import {} from @dimjs/model we must be setup some configurations as below.
// faltjs.dts.js
{
  compilationOptions: {
    followSymlinks: false,
  },
  entries: [
    libraries: {
      importedLibraries: ['@dimjs/model'],
    },
  ]
}
// tsconfig.json
{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    // setup "paths" is {}
    "paths": {}
  }
}
  1. We must be manully install @types/wechat-miniprogram": "^3.2.0" in your project.

reference sites:

https://github.com/Tencent/westore/blob/master/packages/westore/utils/create.js https://github.com/cnyballk/wenaox https://github.com/charleyw/wechat-weapp-redux-todos/blob/master/src/utils/enhancedConnect.js

Notes

小程序编译引擎在压缩编译模式下会出现解析异常, 初步定位是小程序编译器的缺陷

 pluginConfigs: {
        terser: {
          options: {
            // 使用快速编译模式, 小程序工作正常.
            compress: false,
            mangle: true,
          },
        },
  ...
1.2.3

3 months ago

1.2.0

10 months ago

1.2.1

10 months ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.56

2 years ago

1.0.55

3 years ago

1.0.54

3 years ago

1.0.53

3 years ago

1.0.52

3 years ago

1.0.51

3 years ago

1.0.50

3 years ago

1.0.49

3 years ago

1.0.48

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.44

3 years ago