@modern-js/main-doc 2.0.3-alpha.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (519) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/index.md +0 -5
  3. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/lint.md +1 -1
  4. package/en/docusaurus-plugin-content-docs/current/apis/app/commands/serve.md +2 -4
  5. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/framework/lambda.md +12 -12
  6. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/api.md +13 -13
  7. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/app.md +0 -2
  8. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/api/functions/common.md +1 -3
  9. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/app.md +16 -9
  10. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/index_.md +0 -1
  11. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/routes.md +5 -3
  12. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/server.md +6 -4
  13. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/stories.md +2 -2
  14. package/en/docusaurus-plugin-content-docs/current/apis/app/hooks/src/test.md +1 -1
  15. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/app/define-config.md +0 -1
  16. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/bff/hook.md +3 -3
  17. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/bootstrap.md +3 -6
  18. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/create-app.md +1 -3
  19. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-loader.md +2 -2
  20. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-module-apps.md +58 -51
  21. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/core/use-runtime-context.md +3 -4
  22. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/index.md +0 -5
  23. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/connect.md +8 -5
  24. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/create-store.md +1 -3
  25. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/handle-effect.md +3 -3
  26. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/model_.md +0 -1
  27. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-model.md +0 -3
  28. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/model/use-store.md +0 -2
  29. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/router/router.md +23 -54
  30. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/ssr/no-ssr.md +1 -8
  31. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/ssr/pre-render.md +10 -6
  32. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/testing/render.md +0 -2
  33. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/css-in-js.md +2 -2
  34. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/head.md +3 -5
  35. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/utility/loadable.md +14 -15
  36. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/web-server/hook.md +4 -5
  37. package/en/docusaurus-plugin-content-docs/current/apis/app/runtime/web-server/middleware.md +7 -6
  38. package/en/docusaurus-plugin-content-docs/current/components/command-tip.md +3 -2
  39. package/en/docusaurus-plugin-content-docs/current/components/enable-bff.md +12 -16
  40. package/en/docusaurus-plugin-content-docs/current/components/enable-micro-frontend.md +4 -4
  41. package/en/docusaurus-plugin-content-docs/current/components/global-proxy-config.md +6 -9
  42. package/en/docusaurus-plugin-content-docs/current/components/global-proxy.md +0 -1
  43. package/en/docusaurus-plugin-content-docs/current/components/micro-master-manifest-config.md +2 -2
  44. package/en/docusaurus-plugin-content-docs/current/components/micro-runtime-config.md +1 -1
  45. package/en/docusaurus-plugin-content-docs/current/components/reduck-migration.md +0 -1
  46. package/en/docusaurus-plugin-content-docs/current/components/reduck-tip.md +1 -1
  47. package/en/docusaurus-plugin-content-docs/current/components/router-legacy-tip.md +0 -1
  48. package/en/docusaurus-plugin-content-docs/current/configure/app/auto-load-plugin.md +8 -9
  49. package/en/docusaurus-plugin-content-docs/current/configure/app/bff/prefix.md +6 -6
  50. package/en/docusaurus-plugin-content-docs/current/configure/app/bff/proxy.md +8 -9
  51. package/en/docusaurus-plugin-content-docs/current/configure/app/builder-plugins.md +6 -6
  52. package/en/docusaurus-plugin-content-docs/current/configure/app/deploy/microFrontend.md +11 -13
  53. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/asset-prefix.md +2 -2
  54. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/hmr.md +2 -2
  55. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/https.md +2 -2
  56. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/port.md +2 -2
  57. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/progress-bar.md +2 -2
  58. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/proxy.md +0 -1
  59. package/en/docusaurus-plugin-content-docs/current/configure/app/dev/start-url.md +2 -2
  60. package/en/docusaurus-plugin-content-docs/current/configure/app/experiments/lazy-compilation.md +2 -2
  61. package/en/docusaurus-plugin-content-docs/current/configure/app/html/app-icon.md +2 -2
  62. package/en/docusaurus-plugin-content-docs/current/configure/app/html/crossorigin.md +2 -2
  63. package/en/docusaurus-plugin-content-docs/current/configure/app/html/disable-html-folder.md +2 -2
  64. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon-by-entries.md +2 -2
  65. package/en/docusaurus-plugin-content-docs/current/configure/app/html/favicon.md +2 -2
  66. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject-by-entries.md +2 -2
  67. package/en/docusaurus-plugin-content-docs/current/configure/app/html/inject.md +2 -2
  68. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta-by-entries.md +2 -2
  69. package/en/docusaurus-plugin-content-docs/current/configure/app/html/meta.md +2 -2
  70. package/en/docusaurus-plugin-content-docs/current/configure/app/html/mount-id.md +2 -2
  71. package/en/docusaurus-plugin-content-docs/current/configure/app/html/tags-by-entries.md +12 -0
  72. package/en/docusaurus-plugin-content-docs/current/configure/app/html/tags.md +12 -0
  73. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-by-entries.md +2 -2
  74. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters-by-entries.md +2 -2
  75. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template-parameters.md +2 -2
  76. package/en/docusaurus-plugin-content-docs/current/configure/app/html/template.md +2 -2
  77. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title-by-entries.md +2 -2
  78. package/en/docusaurus-plugin-content-docs/current/configure/app/html/title.md +2 -2
  79. package/en/docusaurus-plugin-content-docs/current/configure/app/output/asset-prefix.md +2 -2
  80. package/en/docusaurus-plugin-content-docs/current/configure/app/output/assets-retry.md +2 -2
  81. package/en/docusaurus-plugin-content-docs/current/configure/app/output/charset.md +2 -2
  82. package/en/docusaurus-plugin-content-docs/current/configure/app/output/clean-dist-path.md +2 -2
  83. package/en/docusaurus-plugin-content-docs/current/configure/app/output/convert-to-rem.md +2 -2
  84. package/en/docusaurus-plugin-content-docs/current/configure/app/output/copy.md +2 -2
  85. package/en/docusaurus-plugin-content-docs/current/configure/app/output/css-module-local-ident-name.md +2 -2
  86. package/en/docusaurus-plugin-content-docs/current/configure/app/output/data-uri-limit.md +2 -2
  87. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-extract.md +2 -2
  88. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-css-module-extension.md +2 -2
  89. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-filename-hash.md +2 -2
  90. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-inline-runtime-chunk.md +2 -2
  91. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-minimize.md +2 -2
  92. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-node-polyfill.md +8 -6
  93. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-source-map.md +2 -2
  94. package/en/docusaurus-plugin-content-docs/current/configure/app/output/disable-ts-checker.md +2 -2
  95. package/en/docusaurus-plugin-content-docs/current/configure/app/output/dist-path.md +2 -2
  96. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-fallback.md +2 -2
  97. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-asset-manifest.md +2 -2
  98. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-css-module-tsdeclaration.md +2 -2
  99. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-scripts.md +2 -2
  100. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-inline-styles.md +2 -2
  101. package/en/docusaurus-plugin-content-docs/current/configure/app/output/enable-latest-decorators.md +2 -2
  102. package/en/docusaurus-plugin-content-docs/current/configure/app/output/externals.md +2 -2
  103. package/en/docusaurus-plugin-content-docs/current/configure/app/output/filename.md +2 -2
  104. package/en/docusaurus-plugin-content-docs/current/configure/app/output/legal-comments.md +2 -2
  105. package/en/docusaurus-plugin-content-docs/current/configure/app/output/override-browserslist.md +2 -2
  106. package/en/docusaurus-plugin-content-docs/current/configure/app/output/polyfill.md +2 -2
  107. package/en/docusaurus-plugin-content-docs/current/configure/app/output/ssg.md +3 -2
  108. package/en/docusaurus-plugin-content-docs/current/configure/app/output/svg-default-export.md +2 -2
  109. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/build-cache.md +2 -2
  110. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/bundle-analyze.md +2 -2
  111. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/chunk-split.md +2 -2
  112. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/print-file-size.md +2 -2
  113. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/profile.md +2 -2
  114. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-console.md +2 -2
  115. package/en/docusaurus-plugin-content-docs/current/configure/app/performance/remove-moment-locale.md +2 -2
  116. package/en/docusaurus-plugin-content-docs/current/configure/app/plugins.md +6 -6
  117. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/intro.md +11 -10
  118. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/master-app.md +1 -2
  119. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/router.md +6 -6
  120. package/en/docusaurus-plugin-content-docs/current/configure/app/runtime/state.md +15 -15
  121. package/en/docusaurus-plugin-content-docs/current/configure/app/security/sri.md +2 -2
  122. package/en/docusaurus-plugin-content-docs/current/configure/app/server/base-url.md +3 -4
  123. package/en/docusaurus-plugin-content-docs/current/configure/app/server/enable-framework-ext.md +5 -4
  124. package/en/docusaurus-plugin-content-docs/current/configure/app/server/port.md +24 -4
  125. package/en/docusaurus-plugin-content-docs/current/configure/app/server/public-routes.md +6 -6
  126. package/en/docusaurus-plugin-content-docs/current/configure/app/server/routes.md +7 -7
  127. package/en/docusaurus-plugin-content-docs/current/configure/app/server/ssr-by-entries.md +5 -5
  128. package/en/docusaurus-plugin-content-docs/current/configure/app/server/ssr.md +4 -4
  129. package/en/docusaurus-plugin-content-docs/current/configure/app/source/alias.md +2 -2
  130. package/en/docusaurus-plugin-content-docs/current/configure/app/source/compile-js-data-uri.md +2 -2
  131. package/en/docusaurus-plugin-content-docs/current/configure/app/source/config-dir.md +2 -2
  132. package/en/docusaurus-plugin-content-docs/current/configure/app/source/define.md +2 -2
  133. package/en/docusaurus-plugin-content-docs/current/configure/app/source/design-system.md +656 -634
  134. package/en/docusaurus-plugin-content-docs/current/configure/app/source/disable-default-entries.md +1 -1
  135. package/en/docusaurus-plugin-content-docs/current/configure/app/source/disable-entry-dirs.md +8 -8
  136. package/en/docusaurus-plugin-content-docs/current/configure/app/source/enable-async-entry.md +1 -1
  137. package/en/docusaurus-plugin-content-docs/current/configure/app/source/entries-dir.md +7 -7
  138. package/en/docusaurus-plugin-content-docs/current/configure/app/source/entries.md +4 -6
  139. package/en/docusaurus-plugin-content-docs/current/configure/app/source/exclude.md +2 -2
  140. package/en/docusaurus-plugin-content-docs/current/configure/app/source/global-vars.md +2 -2
  141. package/en/docusaurus-plugin-content-docs/current/configure/app/source/include.md +2 -2
  142. package/en/docusaurus-plugin-content-docs/current/configure/app/source/module-scopes.md +2 -2
  143. package/en/docusaurus-plugin-content-docs/current/configure/app/source/pre-entry.md +2 -2
  144. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-extension-prefix.md +2 -2
  145. package/en/docusaurus-plugin-content-docs/current/configure/app/source/resolve-main-fields.md +2 -2
  146. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/autoprefixer.md +2 -2
  147. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/babel.md +2 -2
  148. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-extract.md +2 -2
  149. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/css-loader.md +2 -2
  150. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/dev-server.md +2 -2
  151. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/html-plugin.md +2 -2
  152. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/inspector.md +2 -2
  153. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/jest.md +9 -9
  154. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/less.md +2 -2
  155. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/minify-css.md +2 -2
  156. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/postcss.md +2 -2
  157. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/pug.md +2 -2
  158. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/sass.md +2 -2
  159. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/style-loader.md +2 -2
  160. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/styled-components.md +2 -2
  161. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/swc.md +12 -1
  162. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/terser.md +2 -2
  163. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-checker.md +2 -2
  164. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/ts-loader.md +2 -2
  165. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack-chain.md +2 -2
  166. package/en/docusaurus-plugin-content-docs/current/configure/app/tools/webpack.md +2 -2
  167. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/frameworks.md +6 -6
  168. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/function.md +44 -38
  169. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/index.md +9 -9
  170. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/bff/type.md +0 -1
  171. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/code-split.md +3 -4
  172. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/compatibility.md +6 -7
  173. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/eslint.md +0 -1
  174. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/index.md +0 -5
  175. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/low-level.md +17 -19
  176. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssg.md +8 -10
  177. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssr.md +5 -11
  178. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/testing.md +3 -3
  179. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/web-server.md +3 -4
  180. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/alias.md +7 -11
  181. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-in-js.md +6 -6
  182. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/css-modules.md +2 -2
  183. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/less-sass.md +0 -1
  184. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/postcss.md +43 -47
  185. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/css/tailwindcss.md +2 -2
  186. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/data-fetch.md +106 -192
  187. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/env-vars.md +8 -8
  188. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/html.md +55 -47
  189. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/mock.md +4 -4
  190. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/proxy.md +4 -5
  191. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/routes.md +90 -9
  192. package/en/docusaurus-plugin-content-docs/current/guides/concept/entries.md +1 -2
  193. package/en/docusaurus-plugin-content-docs/current/guides/get-started/quick-start.md +1 -1
  194. package/en/docusaurus-plugin-content-docs/current/guides/get-started/upgrade.md +1 -1
  195. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/extend.md +13 -13
  196. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook-list.md +2 -2
  197. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook.md +57 -54
  198. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/implement.md +11 -11
  199. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/lifecycle.md +0 -1
  200. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/plugin-api.md +4 -4
  201. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/app.md +33 -33
  202. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/ejs.md +3 -3
  203. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/fs.md +3 -3
  204. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/git.md +3 -2
  205. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/handlebars.md +3 -4
  206. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/json.md +9 -12
  207. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/api/npm.md +2 -3
  208. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/introduce.md +4 -3
  209. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/run-in-js.md +4 -5
  210. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/codesmith/structure.md +13 -11
  211. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/common.md +18 -27
  212. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/abstract.md +1 -4
  213. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/introduce.md +1 -1
  214. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/file/updateJSONFile.md +4 -5
  215. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/hook/onForged.md +0 -1
  216. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/addInputAfter.md +1 -4
  217. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/addInputBefore.md +1 -3
  218. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/setInput.md +1 -1
  219. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/input/type.md +1 -1
  220. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/api/introduce.md +8 -9
  221. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/develop.md +11 -12
  222. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/plugin/use.md +8 -8
  223. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/project.md +1 -2
  224. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c01-introduction.md +7 -8
  225. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c02-development.md +18 -21
  226. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c03-main-app.md +41 -44
  227. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c04-communicate.md +7 -5
  228. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/micro-frontend/c05-mixed-stack.md +1 -1
  229. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/auto-actions.md +0 -1
  230. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/computed-state.md +0 -2
  231. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/define-model.md +3 -6
  232. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/faq.md +2 -5
  233. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/manage-effects.md +2 -5
  234. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/model-communicate.md +1 -4
  235. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/performance.md +1 -5
  236. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/quick-start.md +0 -6
  237. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/redux-integration.md +3 -2
  238. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/test-model.md +1 -1
  239. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/typescript-best-practice.md +13 -14
  240. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/use-model.md +14 -12
  241. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/model/use-out-of-modernjs.md +4 -6
  242. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c01-start.md +2 -2
  243. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c03-css.md +6 -8
  244. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c04-routes.md +2 -2
  245. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c05-loader.md +2 -1
  246. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c07-container.md +5 -5
  247. package/en/docusaurus-plugin-content-docs/current/tutorials/first-app/c08-entries.md +5 -6
  248. package/package.json +4 -4
  249. package/scripts/config.ts +4 -2
  250. package/scripts/summary.en.json +1 -1
  251. package/scripts/summary.zh.json +1 -1
  252. package/scripts/sync.ts +1 -1
  253. package/zh/apis/app/commands/index.md +0 -5
  254. package/zh/apis/app/commands/lint.md +1 -1
  255. package/zh/apis/app/commands/serve.md +2 -4
  256. package/zh/apis/app/hooks/api/framework/lambda.md +12 -12
  257. package/zh/apis/app/hooks/api/functions/api.md +13 -13
  258. package/zh/apis/app/hooks/api/functions/app.md +0 -2
  259. package/zh/apis/app/hooks/api/functions/common.md +1 -1
  260. package/zh/apis/app/hooks/index.md +0 -5
  261. package/zh/apis/app/hooks/shared.md +0 -1
  262. package/zh/apis/app/hooks/src/app.md +16 -9
  263. package/zh/apis/app/hooks/src/index_.md +0 -2
  264. package/zh/apis/app/hooks/src/routes.md +6 -7
  265. package/zh/apis/app/hooks/src/server.md +6 -4
  266. package/zh/apis/app/hooks/src/stories.md +1 -1
  267. package/zh/apis/app/hooks/src/test.md +1 -1
  268. package/zh/apis/app/runtime/app/define-config.md +1 -2
  269. package/zh/apis/app/runtime/bff/hook.md +3 -3
  270. package/zh/apis/app/runtime/core/bootstrap.md +2 -3
  271. package/zh/apis/app/runtime/core/use-loader.md +2 -2
  272. package/zh/apis/app/runtime/core/use-module-apps.md +53 -50
  273. package/zh/apis/app/runtime/core/use-runtime-context.md +3 -4
  274. package/zh/apis/app/runtime/index.md +0 -5
  275. package/zh/apis/app/runtime/model/Provider.md +1 -0
  276. package/zh/apis/app/runtime/model/auto-actions.md +1 -1
  277. package/zh/apis/app/runtime/model/connect.md +9 -5
  278. package/zh/apis/app/runtime/model/create-app.md +3 -3
  279. package/zh/apis/app/runtime/model/create-store.md +2 -4
  280. package/zh/apis/app/runtime/model/handle-effect.md +3 -4
  281. package/zh/apis/app/runtime/model/model_.md +0 -3
  282. package/zh/apis/app/runtime/model/use-local-model.md +0 -1
  283. package/zh/apis/app/runtime/model/use-store.md +0 -2
  284. package/zh/apis/app/runtime/router/router.md +23 -53
  285. package/zh/apis/app/runtime/ssr/no-ssr.md +1 -5
  286. package/zh/apis/app/runtime/ssr/pre-render.md +10 -6
  287. package/zh/apis/app/runtime/testing/cleanup.md +2 -2
  288. package/zh/apis/app/runtime/testing/render.md +0 -2
  289. package/zh/apis/app/runtime/utility/css-in-js.md +2 -2
  290. package/zh/apis/app/runtime/utility/head.md +3 -5
  291. package/zh/apis/app/runtime/utility/loadable.md +14 -15
  292. package/zh/apis/app/runtime/web-server/hook.md +5 -4
  293. package/zh/apis/app/runtime/web-server/middleware.md +8 -6
  294. package/zh/apis/monorepo/commands/bump.md +1 -1
  295. package/zh/apis/monorepo/commands/change.md +3 -2
  296. package/zh/apis/monorepo/commands/gen-release-note.md +1 -2
  297. package/zh/apis/monorepo/commands/index.md +1 -6
  298. package/zh/apis/monorepo/commands/lint.md +1 -1
  299. package/zh/apis/monorepo/commands/release.md +0 -1
  300. package/zh/apis/monorepo/hooks/index.md +1 -6
  301. package/zh/components/command-tip.md +3 -2
  302. package/zh/components/enable-bff.md +12 -16
  303. package/zh/components/enable-micro-frontend.md +4 -4
  304. package/zh/components/global-proxy-config.md +6 -9
  305. package/zh/components/global-proxy.md +0 -1
  306. package/zh/components/init-app.md +0 -1
  307. package/zh/components/micro-master-manifest-config.md +2 -2
  308. package/zh/components/micro-runtime-config.md +1 -1
  309. package/zh/components/reduck-migration.md +0 -1
  310. package/zh/components/router-legacy-tip.md +0 -1
  311. package/zh/configure/app/auto-load-plugin.md +9 -10
  312. package/zh/configure/app/bff/prefix.md +6 -10
  313. package/zh/configure/app/bff/proxy.md +9 -8
  314. package/zh/configure/app/builder-plugins.md +6 -6
  315. package/zh/configure/app/deploy/microFrontend.md +11 -11
  316. package/zh/configure/app/dev/asset-prefix.md +2 -2
  317. package/zh/configure/app/dev/hmr.md +2 -2
  318. package/zh/configure/app/dev/https.md +2 -2
  319. package/zh/configure/app/dev/port.md +2 -2
  320. package/zh/configure/app/dev/progress-bar.md +2 -2
  321. package/zh/configure/app/dev/proxy.md +0 -1
  322. package/zh/configure/app/dev/start-url.md +2 -2
  323. package/zh/configure/app/experiments/lazy-compilation.md +2 -2
  324. package/zh/configure/app/html/app-icon.md +2 -2
  325. package/zh/configure/app/html/crossorigin.md +2 -2
  326. package/zh/configure/app/html/disable-html-folder.md +2 -2
  327. package/zh/configure/app/html/favicon-by-entries.md +2 -2
  328. package/zh/configure/app/html/favicon.md +2 -2
  329. package/zh/configure/app/html/inject-by-entries.md +2 -2
  330. package/zh/configure/app/html/inject.md +2 -2
  331. package/zh/configure/app/html/meta-by-entries.md +2 -2
  332. package/zh/configure/app/html/meta.md +2 -2
  333. package/zh/configure/app/html/mount-id.md +2 -2
  334. package/zh/configure/app/html/tags-by-entries.md +12 -0
  335. package/zh/configure/app/html/tags.md +12 -0
  336. package/zh/configure/app/html/template-by-entries.md +2 -2
  337. package/zh/configure/app/html/template-parameters-by-entries.md +2 -2
  338. package/zh/configure/app/html/template-parameters.md +2 -2
  339. package/zh/configure/app/html/template.md +2 -2
  340. package/zh/configure/app/html/title-by-entries.md +2 -2
  341. package/zh/configure/app/html/title.md +2 -2
  342. package/zh/configure/app/output/asset-prefix.md +2 -2
  343. package/zh/configure/app/output/assets-retry.md +2 -2
  344. package/zh/configure/app/output/charset.md +2 -2
  345. package/zh/configure/app/output/clean-dist-path.md +2 -2
  346. package/zh/configure/app/output/convert-to-rem.md +2 -2
  347. package/zh/configure/app/output/copy.md +2 -2
  348. package/zh/configure/app/output/css-module-local-ident-name.md +2 -2
  349. package/zh/configure/app/output/data-uri-limit.md +2 -2
  350. package/zh/configure/app/output/disable-css-extract.md +2 -2
  351. package/zh/configure/app/output/disable-css-module-extension.md +2 -2
  352. package/zh/configure/app/output/disable-filename-hash.md +2 -2
  353. package/zh/configure/app/output/disable-inline-runtime-chunk.md +2 -2
  354. package/zh/configure/app/output/disable-minimize.md +2 -2
  355. package/zh/configure/app/output/disable-node-polyfill.md +8 -8
  356. package/zh/configure/app/output/disable-source-map.md +2 -2
  357. package/zh/configure/app/output/disable-ts-checker.md +2 -2
  358. package/zh/configure/app/output/dist-path.md +2 -2
  359. package/zh/configure/app/output/enable-asset-fallback.md +2 -2
  360. package/zh/configure/app/output/enable-asset-manifest.md +2 -2
  361. package/zh/configure/app/output/enable-css-module-tsdeclaration.md +2 -2
  362. package/zh/configure/app/output/enable-inline-scripts.md +2 -2
  363. package/zh/configure/app/output/enable-inline-styles.md +2 -2
  364. package/zh/configure/app/output/enable-latest-decorators.md +2 -2
  365. package/zh/configure/app/output/externals.md +2 -2
  366. package/zh/configure/app/output/filename.md +2 -2
  367. package/zh/configure/app/output/legal-comments.md +2 -2
  368. package/zh/configure/app/output/override-browserslist.md +2 -2
  369. package/zh/configure/app/output/polyfill.md +2 -2
  370. package/zh/configure/app/output/ssg.md +3 -2
  371. package/zh/configure/app/output/svg-default-export.md +2 -2
  372. package/zh/configure/app/performance/build-cache.md +2 -2
  373. package/zh/configure/app/performance/bundle-analyze.md +2 -2
  374. package/zh/configure/app/performance/chunk-split.md +2 -2
  375. package/zh/configure/app/performance/print-file-size.md +2 -2
  376. package/zh/configure/app/performance/profile.md +2 -2
  377. package/zh/configure/app/performance/remove-console.md +2 -2
  378. package/zh/configure/app/performance/remove-moment-locale.md +2 -2
  379. package/zh/configure/app/plugins.md +6 -6
  380. package/zh/configure/app/runtime/intro.md +12 -11
  381. package/zh/configure/app/runtime/master-app.md +1 -2
  382. package/zh/configure/app/runtime/router.md +6 -7
  383. package/zh/configure/app/runtime/state.md +15 -16
  384. package/zh/configure/app/security/sri.md +2 -2
  385. package/zh/configure/app/server/base-url.md +3 -6
  386. package/zh/configure/app/server/enable-framework-ext.md +5 -4
  387. package/zh/configure/app/server/port.md +24 -6
  388. package/zh/configure/app/server/public-routes.md +6 -8
  389. package/zh/configure/app/server/routes.md +6 -6
  390. package/zh/configure/app/server/ssr-by-entries.md +5 -8
  391. package/zh/configure/app/server/ssr.md +4 -5
  392. package/zh/configure/app/source/alias.md +2 -2
  393. package/zh/configure/app/source/compile-js-data-uri.md +2 -2
  394. package/zh/configure/app/source/config-dir.md +2 -2
  395. package/zh/configure/app/source/define.md +2 -2
  396. package/zh/configure/app/source/design-system.md +656 -630
  397. package/zh/configure/app/source/disable-default-entries.md +3 -3
  398. package/zh/configure/app/source/disable-entry-dirs.md +8 -7
  399. package/zh/configure/app/source/enable-async-entry.md +3 -3
  400. package/zh/configure/app/source/entries-dir.md +7 -7
  401. package/zh/configure/app/source/entries.md +5 -6
  402. package/zh/configure/app/source/exclude.md +2 -2
  403. package/zh/configure/app/source/global-vars.md +2 -2
  404. package/zh/configure/app/source/include.md +2 -2
  405. package/zh/configure/app/source/module-scopes.md +2 -2
  406. package/zh/configure/app/source/pre-entry.md +2 -2
  407. package/zh/configure/app/source/resolve-extension-prefix.md +2 -2
  408. package/zh/configure/app/source/resolve-main-fields.md +2 -2
  409. package/zh/configure/app/testing/transformer.md +2 -3
  410. package/zh/configure/app/tools/autoprefixer.md +2 -2
  411. package/zh/configure/app/tools/babel.md +2 -2
  412. package/zh/configure/app/tools/css-extract.md +2 -2
  413. package/zh/configure/app/tools/css-loader.md +2 -2
  414. package/zh/configure/app/tools/dev-server.md +2 -2
  415. package/zh/configure/app/tools/html-plugin.md +2 -2
  416. package/zh/configure/app/tools/inspector.md +2 -2
  417. package/zh/configure/app/tools/jest.md +9 -9
  418. package/zh/configure/app/tools/less.md +2 -2
  419. package/zh/configure/app/tools/minify-css.md +2 -2
  420. package/zh/configure/app/tools/postcss.md +2 -2
  421. package/zh/configure/app/tools/pug.md +2 -2
  422. package/zh/configure/app/tools/sass.md +2 -2
  423. package/zh/configure/app/tools/style-loader.md +2 -2
  424. package/zh/configure/app/tools/styled-components.md +2 -2
  425. package/zh/configure/app/tools/swc.md +12 -1
  426. package/zh/configure/app/tools/terser.md +2 -2
  427. package/zh/configure/app/tools/ts-checker.md +2 -2
  428. package/zh/configure/app/tools/ts-loader.md +2 -2
  429. package/zh/configure/app/tools/webpack-chain.md +2 -2
  430. package/zh/configure/app/tools/webpack.md +2 -2
  431. package/zh/guides/advanced-features/bff/frameworks.md +6 -6
  432. package/zh/guides/advanced-features/bff/function.md +49 -44
  433. package/zh/guides/advanced-features/bff/index.md +9 -9
  434. package/zh/guides/advanced-features/bff/type.md +0 -1
  435. package/zh/guides/advanced-features/code-split.md +3 -3
  436. package/zh/guides/advanced-features/compatibility.md +6 -7
  437. package/zh/guides/advanced-features/eslint.md +0 -1
  438. package/zh/guides/advanced-features/index.md +0 -5
  439. package/zh/guides/advanced-features/low-level.md +17 -19
  440. package/zh/guides/advanced-features/ssg.md +8 -9
  441. package/zh/guides/advanced-features/ssr.md +5 -11
  442. package/zh/guides/advanced-features/testing.md +3 -2
  443. package/zh/guides/advanced-features/web-server.md +3 -4
  444. package/zh/guides/basic-features/alias.md +7 -11
  445. package/zh/guides/basic-features/css/css-in-js.md +5 -5
  446. package/zh/guides/basic-features/css/css-modules.md +2 -2
  447. package/zh/guides/basic-features/css/postcss.md +42 -46
  448. package/zh/guides/basic-features/css/tailwindcss.md +5 -5
  449. package/zh/guides/basic-features/data-fetch.md +109 -192
  450. package/zh/guides/basic-features/env-vars.md +7 -6
  451. package/zh/guides/basic-features/html.md +54 -46
  452. package/zh/guides/basic-features/index.md +0 -5
  453. package/zh/guides/basic-features/mock.md +4 -4
  454. package/zh/guides/basic-features/proxy.md +4 -5
  455. package/zh/guides/basic-features/routes.md +23 -20
  456. package/zh/guides/concept/entries.md +5 -7
  457. package/zh/guides/get-started/quick-start.md +3 -4
  458. package/zh/guides/topic-detail/changesets/add.md +1 -3
  459. package/zh/guides/topic-detail/changesets/changelog.md +30 -31
  460. package/zh/guides/topic-detail/changesets/commit.md +44 -45
  461. package/zh/guides/topic-detail/changesets/config.md +2 -1
  462. package/zh/guides/topic-detail/changesets/github.md +6 -10
  463. package/zh/guides/topic-detail/changesets/introduce.md +0 -1
  464. package/zh/guides/topic-detail/changesets/release-note.md +9 -12
  465. package/zh/guides/topic-detail/changesets/release-pre.md +1 -1
  466. package/zh/guides/topic-detail/framework-plugin/extend.md +13 -13
  467. package/zh/guides/topic-detail/framework-plugin/hook-list.md +2 -2
  468. package/zh/guides/topic-detail/framework-plugin/hook.md +57 -54
  469. package/zh/guides/topic-detail/framework-plugin/implement.md +11 -11
  470. package/zh/guides/topic-detail/framework-plugin/plugin-api.md +4 -4
  471. package/zh/guides/topic-detail/generator/codesmith/api/app.md +36 -36
  472. package/zh/guides/topic-detail/generator/codesmith/api/ejs.md +2 -2
  473. package/zh/guides/topic-detail/generator/codesmith/api/fs.md +2 -2
  474. package/zh/guides/topic-detail/generator/codesmith/api/git.md +3 -2
  475. package/zh/guides/topic-detail/generator/codesmith/api/handlebars.md +2 -2
  476. package/zh/guides/topic-detail/generator/codesmith/api/json.md +9 -11
  477. package/zh/guides/topic-detail/generator/codesmith/api/npm.md +4 -2
  478. package/zh/guides/topic-detail/generator/codesmith/introduce.md +20 -7
  479. package/zh/guides/topic-detail/generator/codesmith/run-in-js.md +4 -5
  480. package/zh/guides/topic-detail/generator/codesmith/structure.md +13 -10
  481. package/zh/guides/topic-detail/generator/config/common.md +18 -27
  482. package/zh/guides/topic-detail/generator/plugin/abstract.md +1 -1
  483. package/zh/guides/topic-detail/generator/plugin/api/file/introduce.md +1 -0
  484. package/zh/guides/topic-detail/generator/plugin/api/file/updateJSONFile.md +4 -4
  485. package/zh/guides/topic-detail/generator/plugin/api/info/locale.md +1 -1
  486. package/zh/guides/topic-detail/generator/plugin/api/input/addInputAfter.md +2 -2
  487. package/zh/guides/topic-detail/generator/plugin/api/input/addInputBefore.md +3 -4
  488. package/zh/guides/topic-detail/generator/plugin/api/input/setInput.md +1 -1
  489. package/zh/guides/topic-detail/generator/plugin/api/input/type.md +1 -1
  490. package/zh/guides/topic-detail/generator/plugin/api/introduce.md +8 -9
  491. package/zh/guides/topic-detail/generator/plugin/develop.md +13 -13
  492. package/zh/guides/topic-detail/generator/plugin/use.md +8 -8
  493. package/zh/guides/topic-detail/generator/project.md +1 -1
  494. package/zh/guides/topic-detail/micro-frontend/c01-introduction.md +7 -8
  495. package/zh/guides/topic-detail/micro-frontend/c02-development.md +20 -23
  496. package/zh/guides/topic-detail/micro-frontend/c03-main-app.md +41 -44
  497. package/zh/guides/topic-detail/micro-frontend/c04-communicate.md +7 -5
  498. package/zh/guides/topic-detail/micro-frontend/c05-mixed-stack.md +1 -1
  499. package/zh/guides/topic-detail/model/auto-actions.md +0 -1
  500. package/zh/guides/topic-detail/model/computed-state.md +0 -2
  501. package/zh/guides/topic-detail/model/define-model.md +3 -6
  502. package/zh/guides/topic-detail/model/faq.md +2 -5
  503. package/zh/guides/topic-detail/model/manage-effects.md +2 -5
  504. package/zh/guides/topic-detail/model/model-communicate.md +1 -4
  505. package/zh/guides/topic-detail/model/performance.md +1 -5
  506. package/zh/guides/topic-detail/model/quick-start.md +0 -6
  507. package/zh/guides/topic-detail/model/redux-integration.md +3 -2
  508. package/zh/guides/topic-detail/model/test-model.md +1 -1
  509. package/zh/guides/topic-detail/model/typescript-best-practice.md +13 -14
  510. package/zh/guides/topic-detail/model/use-model.md +14 -12
  511. package/zh/guides/topic-detail/model/use-out-of-modernjs.md +4 -6
  512. package/zh/guides/topic-detail/monorepo/intro.md +0 -1
  513. package/zh/guides/topic-detail/monorepo/sub-project-interface.md +14 -7
  514. package/zh/tutorials/first-app/c01-start.md +2 -2
  515. package/zh/tutorials/first-app/c03-css.md +6 -9
  516. package/zh/tutorials/first-app/c04-routes.md +1 -1
  517. package/zh/tutorials/first-app/c05-loader.md +2 -1
  518. package/zh/tutorials/first-app/c07-container.md +6 -7
  519. package/zh/tutorials/first-app/c08-entries.md +5 -7
@@ -50,7 +50,7 @@ interface State {
50
50
  pending: boolean;
51
51
  result: any;
52
52
  error: string;
53
- }
53
+ };
54
54
  }
55
55
  ```
56
56
 
@@ -75,9 +75,10 @@ interface State {
75
75
 
76
76
  - `pending`: the default value is `"pending"`. Change the name of the `pending` field in the returned State. Usage is the same as `result`.
77
77
 
78
- - `error`: the default value is `"error"`. Change the name of the `error` field in the returned State. Usage is the same as `result`.
78
+ - `error`: the default value is `"error"`. Change the name of the `error` field in the returned State. Usage is the same as `result`.
79
79
 
80
80
  - `combineMode`: the default value is `"merge"`。get fulfilled state results. There are two ways to deal with it (The data types that can be automatically processed here are also limited to simple object or array types):
81
+
81
82
  - `"merge"`: the previous data is merged with the current data. the data is an array type, operation is similar to `[].concat(lastData, currentData)`. the data is an object,operation is similar to `{...lastData, ...curData}`.
82
83
  - `"replace"`: the current data directly replaces the previous data.
83
84
 
@@ -95,7 +96,6 @@ interface State {
95
96
  }
96
97
  ```
97
98
 
98
-
99
99
  ### Return Type
100
100
 
101
101
  Objects are processed by actions in pending, fulfilled, and rejected states.
@@ -141,7 +141,6 @@ interface ModelDesc {
141
141
  }
142
142
  ```
143
143
 
144
-
145
144
  2. Depends on the state of other Models
146
145
 
147
146
  ```ts
@@ -11,7 +11,6 @@ import ReduckTip from '@site-docs-en/components/reduck-tip.md'
11
11
  The original type of Reduck is complex. The following type definition shows the simplified type information. For the original type, see [**model**](https://github.com/modern-js-dev/reduck/blob/main/packages/store/src/model/model.ts)。
12
12
  :::
13
13
 
14
-
15
14
  ## Function Signature
16
15
 
17
16
  ```ts
@@ -27,14 +26,12 @@ function useModel(
27
26
  ): [state, actions, subscribe];
28
27
  ```
29
28
 
30
-
31
29
  ### Input
32
30
 
33
31
  - models: Array of Model objects, which can be passed in as an array type parameter, or all Models can be passed in as parameters one by one.
34
32
  - stateSelector: Optional parameters, used to filter State calculations. The first n parameters are the States corresponding to n Models, and the returned data is used as the first element of the `useModel` return value array.
35
33
  - actionSelector: Optional parameters, used to filter Action calculations. The first n parameters are the States corresponding to n Models, and the returned data is used as the second element of the `useModel` return value array.
36
34
 
37
-
38
35
  ### Return Value
39
36
 
40
37
  Returns an array with each value:
@@ -9,7 +9,6 @@ import ReduckTip from '@site-docs-en/components/reduck-tip.md'
9
9
 
10
10
  `useStore` Used to get the store shared by the current component tree.
11
11
 
12
-
13
12
  ## Function Signature
14
13
 
15
14
  ```ts
@@ -20,7 +19,6 @@ function useStore(): ReduckStore;
20
19
 
21
20
  - ReduckStore: Reduck Store,type refer to the return type of [createStore](./create-store.md).
22
21
 
23
-
24
22
  :::info More
25
23
  [Use Model](/docs/guides/topic-detail/model/use-model).
26
24
  :::
@@ -21,7 +21,7 @@ interface NavigateFunction {
21
21
  replace?: boolean;
22
22
  state?: any;
23
23
  relative?: RelativeRoutingType;
24
- }
24
+ },
25
25
  ): void;
26
26
  (delta: number): void;
27
27
  }
@@ -30,13 +30,13 @@ interface NavigateFunction {
30
30
  The `useNavigate` hook returns a function that lets you navigate programmatically。
31
31
 
32
32
  ```tsx
33
- import { useNavigate } from "@modern-js/runtime/router";
33
+ import { useNavigate } from '@modern-js/runtime/router';
34
34
 
35
35
  export function HomeButton() {
36
36
  let navigate = useNavigate();
37
37
 
38
38
  function handleClick() {
39
- navigate("/home");
39
+ navigate('/home');
40
40
  }
41
41
 
42
42
  return (
@@ -81,19 +81,13 @@ function App() {
81
81
  ### useParams
82
82
 
83
83
  ```ts
84
- declare function useParams<
85
- K extends string = string
86
- >(): Readonly<Params<K>>;
84
+ declare function useParams<K extends string = string>(): Readonly<Params<K>>;
87
85
  ```
88
86
 
89
87
  The `useParams` hook returns an object of key/value pairs of the dynamic params from the current URL that were matched by the `<Route path>`.
90
88
 
91
89
  ```tsx
92
- import {
93
- Routes,
94
- Route,
95
- useParams
96
- } from "@modern-js/runtime/router";
90
+ import { Routes, Route, useParams } from '@modern-js/runtime/router';
97
91
 
98
92
  function BlogPost() {
99
93
  const { slug } = useParams();
@@ -103,10 +97,10 @@ function BlogPost() {
103
97
  function App() {
104
98
  return (
105
99
  <Routes>
106
- <Route path="/" element={ <div>home</div> } />
107
- <Route path="/blog/:slug" element={ <BlogPost />}/>
100
+ <Route path="/" element={<div>home</div>} />
101
+ <Route path="/blog/:slug" element={<BlogPost />} />
108
102
  </Routes>
109
- )
103
+ );
110
104
  }
111
105
  ```
112
106
 
@@ -118,10 +112,7 @@ function App() {
118
112
  declare function Link(props: LinkProps): React.ReactElement;
119
113
 
120
114
  interface LinkProps
121
- extends Omit<
122
- React.AnchorHTMLAttributes<HTMLAnchorElement>,
123
- "href"
124
- > {
115
+ extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
125
116
  replace?: boolean;
126
117
  state?: any;
127
118
  to: To;
@@ -140,45 +131,31 @@ A `<Link>` is an element that lets the user navigate to another page by clicking
140
131
  ### NavLink
141
132
 
142
133
  ```ts
143
- declare function NavLink(
144
- props: NavLinkProps
145
- ): React.ReactElement;
134
+ declare function NavLink(props: NavLinkProps): React.ReactElement;
146
135
 
147
136
  interface NavLinkProps
148
- extends Omit<
149
- LinkProps,
150
- "className" | "style" | "children"
151
- > {
137
+ extends Omit<LinkProps, 'className' | 'style' | 'children'> {
152
138
  caseSensitive?: boolean;
153
139
  children?:
154
140
  | React.ReactNode
155
141
  | ((props: { isActive: boolean }) => React.ReactNode);
156
- className?:
157
- | string
158
- | ((props: {
159
- isActive: boolean;
160
- }) => string | undefined);
142
+ className?: string | ((props: { isActive: boolean }) => string | undefined);
161
143
  end?: boolean;
162
144
  style?:
163
145
  | React.CSSProperties
164
- | ((props: {
165
- isActive: boolean;
166
- }) => React.CSSProperties);
146
+ | ((props: { isActive: boolean }) => React.CSSProperties);
167
147
  }
168
148
  ```
169
149
 
170
150
  A `<NavLink>` is a special kind of `<Link>` that knows whether or not it is "active".
171
151
 
172
-
173
152
  ### Outlet
174
153
 
175
154
  ```ts
176
155
  interface OutletProps {
177
156
  context?: unknown;
178
157
  }
179
- declare function Outlet(
180
- props: OutletProps
181
- ): React.ReactElement | null;
158
+ declare function Outlet(props: OutletProps): React.ReactElement | null;
182
159
  ```
183
160
 
184
161
  An `<Outlet>` should be used in parent route elements to render their child route elements. This allows nested UI to show up when child routes are rendered.
@@ -201,10 +178,7 @@ function App() {
201
178
  return (
202
179
  <Routes>
203
180
  <Route path="/" element={<Dashboard />}>
204
- <Route
205
- path="messages"
206
- element={<DashboardMessages />}
207
- />
181
+ <Route path="messages" element={<DashboardMessages />} />
208
182
  <Route path="tasks" element={<DashboardTasks />} />
209
183
  </Route>
210
184
  </Routes>
@@ -225,7 +199,7 @@ interface RouteObject {
225
199
  action?: ActionFunction;
226
200
  element?: React.ReactNode | null;
227
201
  errorElement?: React.ReactNode | null;
228
- handle?: RouteObject["handle"];
202
+ handle?: RouteObject['handle'];
229
203
  shouldRevalidate?: ShouldRevalidateFunction;
230
204
  }
231
205
  ```
@@ -241,14 +215,13 @@ const router = createBrowserRouter([
241
215
  element: <Team />,
242
216
 
243
217
  // when the URL matches this segment
244
- path: "teams/:teamId",
218
+ path: 'teams/:teamId',
245
219
 
246
220
  // with this data loaded before rendering
247
221
  loader: async ({ request, params }) => {
248
- return fetch(
249
- `/fake/api/teams/${params.teamId}.json`,
250
- { signal: request.signal }
251
- );
222
+ return fetch(`/fake/api/teams/${params.teamId}.json`, {
223
+ signal: request.signal,
224
+ });
252
225
  },
253
226
 
254
227
  // performing this mutation when data is submitted to it
@@ -271,21 +244,17 @@ const router = createBrowserRouter(
271
244
  element={<Team />}
272
245
  path="teams/:teamId"
273
246
  loader={async ({ params }) => {
274
- return fetch(
275
- `/fake/api/teams/${params.teamId}.json`
276
- );
247
+ return fetch(`/fake/api/teams/${params.teamId}.json`);
277
248
  }}
278
249
  action={async ({ request }) => {
279
250
  return updateFakeTeam(await request.formData());
280
251
  }}
281
252
  errorElement={<ErrorBoundary />}
282
- />
283
- )
253
+ />,
254
+ ),
284
255
  );
285
256
  ```
286
257
 
287
258
  ## More
288
259
 
289
260
  You can access to [React Router](https://reactrouter.com/) to get the full API information.
290
-
291
-
@@ -9,11 +9,7 @@ The content wrapped by NoSSR will not be rendered at the server, nor will it be
9
9
  ```tsx
10
10
  import { NoSSR } from '@modern-js/runtime';
11
11
 
12
- export default () => (
13
- <NoSSR>
14
- ...
15
- </NoSSR>
16
- )
12
+ export default () => <NoSSR>...</NoSSR>;
17
13
  ```
18
14
 
19
15
  ## Example
@@ -39,6 +35,3 @@ In CSR, it is often necessary to render different content according to the brows
39
35
  Modern.js provides complete browser side information in the SSR context, which can be used to determine the rendering result of the component on the server side.
40
36
 
41
37
  Even so, if there is too much logic in the application, or the developer wants to use the context later, or does not want some content to be rendered at the server side. developer can use the NoSSR component to exclude this part from server-side rendering.
42
-
43
-
44
-
@@ -13,7 +13,7 @@ export default () => (
13
13
  <>
14
14
  <PreRender interval={5} />
15
15
  </>
16
- )
16
+ );
17
17
  ```
18
18
 
19
19
  ## Function Signature
@@ -59,7 +59,7 @@ export default function App() {
59
59
  <PreRender interval={10} />
60
60
  <div>Hello Modern</div>
61
61
  </>
62
- )
62
+ );
63
63
  }
64
64
  ```
65
65
 
@@ -67,10 +67,14 @@ The following example shows how to add the parameters in the query and header in
67
67
 
68
68
  ```tsx
69
69
  /* calculate cache identifier using channel in query and language in header */
70
- <PreRender interval={10} level={2} includes={{
71
- query: ["channel"],
72
- header: ["language"]
73
- }} />
70
+ <PreRender
71
+ interval={10}
72
+ level={2}
73
+ includes={{
74
+ query: ['channel'],
75
+ header: ['language'],
76
+ }}
77
+ />
74
78
  ```
75
79
 
76
80
  The following example shows how not to let the test channel affect the online cache:
@@ -44,7 +44,6 @@ function render(ui: React.ReactElement<any>, options: Options): RenderResult;
44
44
  - `wrapper`: a react component that can be used to customize rendering logic.
45
45
  - `queries`: customize some own `queries`.
46
46
 
47
-
48
47
  ### Return Value
49
48
 
50
49
  - `{...queries}`: all available [queries](https://testing-library.com/docs/queries/about/)。
@@ -55,7 +54,6 @@ function render(ui: React.ReactElement<any>, options: Options): RenderResult;
55
54
  - `unmount`: unmount rendered components. This API is helpful if you want to test what happens after the component is unmounted.
56
55
  - `asFragment`: return the [DocumentFragment](https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment) of rendered component. used to test the response of the DOM structure after the react event is triggered.
57
56
 
58
-
59
57
  ## Example
60
58
 
61
59
  ```ts
@@ -30,7 +30,7 @@ const TomatoButton = styled(Button)`
30
30
  background: tomato;
31
31
  `;
32
32
 
33
- function ButtonExample(){
33
+ function ButtonExample() {
34
34
  return (
35
35
  <>
36
36
  <Button>I'm purple.</Button>
@@ -38,5 +38,5 @@ function ButtonExample(){
38
38
  <TomatoButton>I'm red.</TomatoButton>
39
39
  </>
40
40
  );
41
- };
41
+ }
42
42
  ```
@@ -9,9 +9,7 @@ Used to add html elements (such as title, meta, script, etc.) to the `<head>` el
9
9
  ```tsx
10
10
  import { Helmet } from '@modern-js/runtime/head';
11
11
 
12
- export default () => (
13
- <Helmet>...</Helmet>
14
- )
12
+ export default () => <Helmet>...</Helmet>;
15
13
  ```
16
14
 
17
15
  ## Example
@@ -28,10 +26,10 @@ function IndexPage() {
28
26
  </Helmet>
29
27
  <p>Hello Modern.js!</p>
30
28
  </div>
31
- )
29
+ );
32
30
  }
33
31
 
34
- export default IndexPage
32
+ export default IndexPage;
35
33
  ```
36
34
 
37
35
  ## More
@@ -34,7 +34,7 @@ Used to load component.
34
34
  ```ts
35
35
  import loadable from '@modern-js/runtime/loadable';
36
36
 
37
- const OtherComponent = loadable(() => import('./OtherComponent'))
37
+ const OtherComponent = loadable(() => import('./OtherComponent'));
38
38
  ```
39
39
 
40
40
  #### options.resolveComponent
@@ -46,20 +46,20 @@ Type: `(module: Module, props: Props) => React.ComponentType<Props>`
46
46
  By default, we think that the default export of file is a react component, so we can render the component directly. But when the component is named export, or we need to dynamically determine which component needs to be rendered according to the `props`, we can use `resolveComponent`. Here is an example:
47
47
 
48
48
  ```ts title='component.js'
49
- export const Apple = () => 'Apple!'
50
- export const Orange = () => 'Orange!'
49
+ export const Apple = () => 'Apple!';
50
+ export const Orange = () => 'Orange!';
51
51
  ```
52
52
 
53
53
  ```ts title='loadable.js'
54
54
  const LoadableApple = loadable(() => import('./components'), {
55
- resolveComponent: (components) => components.Apple,
56
- })
55
+ resolveComponent: components => components.Apple,
56
+ });
57
57
  const LoadableOrange = loadable(() => import('./components'), {
58
- resolveComponent: (components) => components.Orange,
59
- })
58
+ resolveComponent: components => components.Orange,
59
+ });
60
60
  const LoadableFruit = loadable(() => import('./components'), {
61
61
  resolveComponent: (components, props) => components[props.fruit],
62
- })
62
+ });
63
63
  ```
64
64
 
65
65
  #### options.fallback
@@ -75,11 +75,10 @@ Whether to support SSR, the default value is `true`。
75
75
  #### LoadableComponent
76
76
 
77
77
  ```ts
78
- type LoadableComponent<Props> =
79
- React.ComponentType<
80
- Props & { fallback?: JSX.Element; }>
81
- & {
82
- preload(props?: Props): void;
83
- load(props?: Props): Promise<React.ComponentType<Props>>;
84
- }
78
+ type LoadableComponent<Props> = React.ComponentType<
79
+ Props & { fallback?: JSX.Element }
80
+ > & {
81
+ preload(props?: Props): void;
82
+ load(props?: Props): Promise<React.ComponentType<Props>>;
83
+ };
85
84
  ```
@@ -13,8 +13,8 @@ For more detail, see [Extend Web Server](/docs/guides/advanced-features/web-serv
13
13
  ```ts
14
14
  import { AfterMatchHook, AfterRenderHook } from '@modern-js/runtime/server';
15
15
 
16
- export const afterMatch: AfterMatchHook = (context, next) => {}
17
- export const afterRender: AfterRenderHook = (context, next) => {}
16
+ export const afterMatch: AfterMatchHook = (context, next) => {};
17
+ export const afterRender: AfterRenderHook = (context, next) => {};
18
18
  ```
19
19
 
20
20
  :::info
@@ -68,7 +68,7 @@ type AfterMatchContext = HookContext & {
68
68
  redirect: (url: string, status: number) => void;
69
69
  rewrite: (entry: string) => void;
70
70
  };
71
- }
71
+ };
72
72
 
73
73
  type AfterRenderContext = {
74
74
  template: {
@@ -82,7 +82,6 @@ type AfterRenderContext = {
82
82
  };
83
83
  ```
84
84
 
85
-
86
85
  ### Input
87
86
 
88
87
  - `context`: Hook context.
@@ -127,5 +126,5 @@ import type { AfterRender } from '@modern-js/runtime/server';
127
126
 
128
127
  export const afterRender: AfterRenderHook = (context, next) => {
129
128
  ctx.template.prependBody('<div>Footer</div>');
130
- }
129
+ };
131
130
  ```
@@ -15,11 +15,11 @@ For more detail, see [Extend Web Server](/docs/guides/advanced-features/web-serv
15
15
  ```ts
16
16
  import { Middleware } from '@modern-js/runtime/server';
17
17
 
18
- export const middleware: Middleware = async (context, next) => {}
18
+ export const middleware: Middleware = async (context, next) => {};
19
19
  export const middleware: Middleware[] = [
20
20
  async (context, next) => {},
21
21
  async (context, next) => {},
22
- ]
22
+ ];
23
23
  ```
24
24
 
25
25
  :::info
@@ -68,10 +68,12 @@ type MiddlewareContext = {
68
68
  };
69
69
  };
70
70
 
71
- type RequestHandler = (context: Context, next: NextFunction) => Promise<void> | void;
71
+ type RequestHandler = (
72
+ context: Context,
73
+ next: NextFunction,
74
+ ) => Promise<void> | void;
72
75
  ```
73
76
 
74
-
75
77
  ### Input
76
78
 
77
79
  - `context`: Middleware context.
@@ -90,7 +92,7 @@ export const Middleware = () => async (ctx, next) => {
90
92
  ctx.res.once('finish', () => {
91
93
  console.log(Date.now() - start);
92
94
  });
93
- }
95
+ };
94
96
  ```
95
97
 
96
98
  ### Inject Tools & Data
@@ -103,4 +105,3 @@ export const Middleware = () => async (ctx, next) => {
103
105
  ctx.res.locals.rpc = createRpcInstance();
104
106
  });
105
107
  ```
106
-
@@ -15,7 +15,7 @@ If you need to pass parameters to a command, you need to put the parameters afte
15
15
 
16
16
  For example, in the following `package.json` configuration:
17
17
 
18
- ``` json
18
+ ```json
19
19
  {
20
20
  "scripts": {
21
21
  "command": "modern command"
@@ -24,6 +24,7 @@ For example, in the following `package.json` configuration:
24
24
  ```
25
25
 
26
26
  The way to carry parameters when executing the command command is:
27
+
27
28
  ```bash
28
29
  pnpm run command --options
29
30
  ```
@@ -32,7 +33,7 @@ pnpm v6:
32
33
 
33
34
  In the following `package.json` configuration:
34
35
 
35
- ``` json
36
+ ```json
36
37
  {
37
38
  "scripts": {
38
39
  "command": "modern command"
@@ -7,30 +7,26 @@ import TabItem from '@theme/TabItem';
7
7
  <Tabs>
8
8
  <TabItem value="express" label="Express.js" default>
9
9
 
10
- ```ts title="modern.config.ts"
11
- import ExpressPlugin from '@modern-js/plugin-express';
12
- import BffPlugin from '@modern-js/plugin-bff';
10
+ ```ts title="edenx.config.ts"
11
+ import expressPlugin from '@edenx/plugin-express';
12
+ import bffPlugin from '@edenx/plugin-bff';
13
13
 
14
14
  export default defineConfig({
15
- plugins: [
16
- ExpressPlugin(),
17
- BffPlugin()
18
- ]
19
- })
15
+ plugins: [expressPlugin(), bffPlugin()],
16
+ });
20
17
  ```
18
+
21
19
  </TabItem>
22
20
  <TabItem value="koa" label="Koa.js">
23
21
 
24
- ```ts title="modern.config.ts"
25
- import KoaPlugin from '@modern-js/plugin-koa';
26
- import BffPlugin from '@modern-js/plugin-bff';
22
+ ```ts title="edenx.config.ts"
23
+ import koaPlugin from '@edenx/plugin-koa';
24
+ import bffPlugin from '@edenx/plugin-bff';
27
25
 
28
26
  export default defineConfig({
29
- plugins: [
30
- KoaPlugin(),
31
- BffPlugin()
32
- ]
33
- })
27
+ plugins: [koaPlugin(), bffPlugin()],
28
+ });
34
29
  ```
30
+
35
31
  </TabItem>
36
32
  </Tabs>
@@ -1,6 +1,6 @@
1
- ```javascript title="modern.config.ts"
2
- import AppToolPlugin, { defineConfig } from '@modern-js/app-tools';
3
- import GarfishPlugin from '@modern-js/plugin-garfish';
1
+ ```js title="modern.config.ts"
2
+ import appTools, { defineConfig } from '@modern-js/app-tools';
3
+ import garfishPlugin from '@modern-js/plugin-garfish';
4
4
 
5
5
  export default defineConfig({
6
6
  runtime: {
@@ -8,6 +8,6 @@ export default defineConfig({
8
8
  state: true,
9
9
  masterApp: true,
10
10
  },
11
- plugins: [AppToolPlugin(), GarfishPlugin()],
11
+ plugins: [appTools(), garfishPlugin()],
12
12
  });
13
13
  ```
@@ -1,9 +1,8 @@
1
- * Type: `string | Object`
2
- * Default: `null`
1
+ - Type: `string | Object`
2
+ - Default: `null`
3
3
 
4
4
  When this option is configured, the development environment will start a global proxy, similar to [Fiddler](https://www.telerik.com/fiddler), [Charles](https://www.charlesproxy.com/) and other web proxy debugging tools, which can be used to view, modify HTTP/HTTPS requests, responses, and can also be used as a proxy server.
5
5
 
6
-
7
6
  :::tip 提示
8
7
  Using this option requires advance installation `@modern-js/plugin-proxy`。
9
8
  :::
@@ -14,15 +13,15 @@ Using this option requires that the value of `Object` be installed in advance, t
14
13
 
15
14
  Example:
16
15
 
17
- ```typescript title="modern.config.ts"
16
+ ```ts title="modern.config.ts"
18
17
  export default defineConfig({
19
18
  dev: {
20
19
  proxy: {
21
20
  'https://www.baidu.com': 'https://google.com.hk',
22
21
  //可以通过 file 协议直接返回静态文件。
23
22
  'https://example.com/api': 'file://./data.json',
24
- }
25
- }
23
+ },
24
+ },
26
25
  });
27
26
  ```
28
27
 
@@ -30,8 +29,7 @@ export default defineConfig({
30
29
 
31
30
  When the value is `string`, it can be used to specify a separate proxy file, for example:
32
31
 
33
-
34
- ```typescript title="modern.config.ts"
32
+ ```ts title="modern.config.ts"
35
33
  export default defineConfig({
36
34
  dev: {
37
35
  proxy: './proxy.js',
@@ -71,4 +69,3 @@ Access the `localhost:8899` to view the Network and configure proxy rules on the
71
69
  :::caution Caution
72
70
  The https agent automatically installs the certificate to obtain root privileges. Please enter the password as prompted. ** The password is only used when the certificate is trusted and will not be leaked or used for other links **.
73
71
  :::
74
-
@@ -1,4 +1,3 @@
1
-
2
1
  Modern.js provides out-of-the-box global proxy plugin `@modern-js/plugin-proxy`, which is based on [whistle](https://github.com/avwo/whistle) and can be used to view and modify HTTP/HTTPS requests and responses, and can also be used as an HTTP proxy server.
3
2
 
4
3
  ### Set Proxy Rules
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```ts
4
4
  interface Manifest {
5
- getAppList?: ()=> Array<AppInfo>
5
+ getAppList?: () => Array<AppInfo>;
6
6
  }
7
7
  ```
8
8
 
@@ -11,5 +11,5 @@ interface Manifest {
11
11
  Through the `getAppList` configuration, you can customize how to get remote list data
12
12
 
13
13
  ```ts
14
- type GetAppList = ()=> Promise<Array<AppInfo>>;
14
+ type GetAppList = () => Promise<Array<AppInfo>>;
15
15
  ```
@@ -1,4 +1,4 @@
1
- ```javascript title="src/App.tsx"
1
+ ```js title="src/App.tsx"
2
2
  import { defineConfig } from '@modern-js/runtime';
3
3
 
4
4
  defineConfig(App, {