@modern-js/main-doc 0.0.0-next-20221206083411 → 0.0.0-next-20221206090411

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @modern-js/main-doc
2
2
 
3
- ## 0.0.0-next-20221206083411
3
+ ## 0.0.0-next-20221206090411
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -21,4 +21,4 @@
21
21
  - Updated dependencies [3fae2d03b3]
22
22
  - Updated dependencies [df41d71ade]
23
23
  - Updated dependencies [14b712da84]
24
- - @modern-js/builder-doc@0.0.0-next-20221206083411
24
+ - @modern-js/builder-doc@0.0.0-next-20221206090411
package/package.json CHANGED
@@ -11,20 +11,20 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20221206083411",
14
+ "version": "0.0.0-next-20221206090411",
15
15
  "publishConfig": {
16
16
  "registry": "https://registry.npmjs.org/",
17
17
  "access": "public"
18
18
  },
19
19
  "peerDependencies": {
20
- "@modern-js/builder-doc": "0.0.0-next-20221206083411"
20
+ "@modern-js/builder-doc": "0.0.0-next-20221206090411"
21
21
  },
22
22
  "devDependencies": {
23
23
  "ts-node": "^10",
24
24
  "fs-extra": "^10",
25
25
  "@types/node": "^16",
26
26
  "@types/fs-extra": "^9",
27
- "@modern-js/builder-doc": "0.0.0-next-20221206083411"
27
+ "@modern-js/builder-doc": "0.0.0-next-20221206090411"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "npx ts-node ./scripts/sync.ts"
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "experiments (实验性)",
3
+ "position": 15
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "html (模板)",
3
+ "position": 2
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "performance (性能)",
3
+ "position": 13
4
+ }
@@ -12,6 +12,19 @@ sidebar_label: state
12
12
 
13
13
  具体配置项如下:
14
14
 
15
+ ## `models`
16
+
17
+ * 类型:`Array<Model>`
18
+ * 默认值:`[]`
19
+
20
+ 注册提前挂载的 model 对象,这些 model 会在 Reduck store 创建完成后立即执行挂载。一般使用无需提前挂载。
21
+
22
+ ## `initialState`
23
+ * 类型: `Object`
24
+ * * 默认值:`{}`
25
+
26
+ 用于设置全局 store 的初始状态。一般用于 SSR 在 hydration 阶段初始化数据。
27
+
15
28
  ## `immer`
16
29
 
17
30
  * 类型:`boolean`
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "security (安全)",
3
+ "position": 14
4
+ }
@@ -3,6 +3,10 @@ sidebar_position: 1
3
3
  title: 快速上手
4
4
  ---
5
5
 
6
+ import ReduckMigration from '@site-docs/components/reduck-migration.md'
7
+
8
+ <ReduckMigration />
9
+
6
10
  [Reduck](https://github.com/modern-js-dev/reduck) 是 Modern.js 团队开发的遵循 MVC 模式的状态管理库,底层状态存储基于 [Redux](https://redux.js.org/) 实现,同时提供更高层级的抽象,并完全兼容 Redux 生态。
7
11
 
8
12
  Reduck 的目标是以 MVC 模式组织 React 应用开发结构,将业务逻辑维护在 Model 层,业务逻辑与 UI 解耦,让开发业务逻辑更集中、更简单,同时通过更高层级的抽象,减少重复工作(样板代码)。