Skip to content

Commit ce24658

Browse files
authored
feat(website): refactor bridge docs (#4139)
1 parent c5a653c commit ce24658

37 files changed

Lines changed: 2441 additions & 1792 deletions

File tree

apps/website-new/docs/en/guide/basic/data-fetch/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ import Consumer from '@components/en/data-fetch/consumer';
130130

131131
#### Parameters
132132

133-
By default, parameters are passed to the loader function. The type is [dataFetchParams](../../../practice/bridge/react-bridge#datafetchparams), which includes the following field:
133+
By default, parameters are passed to the loader function. The type is [DataFetchParams](/practice/bridge/react-bridge/load-component#datafetchparams), which includes the following field:
134134

135135
- `isDowngrade` (boolean): Indicates whether the current execution context is in a fallback mode. For example, if Server-Side Rendering (SSR) fails, a new request is sent from the client-side (CSR) to the server to call the loader function. In this case, the value is `true`.
136136

apps/website-new/docs/en/guide/framework/modernjs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The Modern.js plugin re-exports `@module-federation/bridge-react` from `@module-
9191
### createRemoteComponent <Badge type="danger">Deprecated</Badge>
9292

9393
::: danger
94-
This API has been deprecated. Please use [createLazyComponent](../../practice/bridge/react-bridge#createlazycomponent) instead.
94+
This API has been deprecated. Please use [createLazyComponent](/practice/bridge/react-bridge/load-component.html#createlazycomponent-vs-createremoteappcomponent) instead.
9595
:::
9696

9797
#### Migration Guide
@@ -128,7 +128,7 @@ export default App;
128128
### createRemoteSSRComponent <Badge type="danger">Deprecated</Badge>
129129

130130
::: danger
131-
This API has been deprecated. Please use [createLazyComponent](../../practice/bridge/react-bridge#createlazycomponent) instead.
131+
This API has been deprecated. Please use [createLazyComponent](/practice/bridge/react-bridge/load-component.html#createlazycomponent-vs-createremoteappcomponent) instead.
132132
:::
133133

134134
#### Migration Guide

apps/website-new/docs/en/guide/start/quick-start.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { Badge, PackageManagerTabs } from "@theme";
44

55
Before reading this guide, please first read the [Setting Up Environment](./setting-up-env). This guide will lead you step by step to learn how to use Module Federation. We will build two independent Single Page Applications (SPAs) that will share components using Module Federation. If you encounter unfamiliar terms in the following text, please refer to the [Glossary](./glossary).
66

7-
_<Badge text="Note:" type="info" /> <small>You can also use [Nx](https://nx.dev) to rapidly scaffold Module Federation projects for [React](../../practice/frameworks/react/using-nx-for-react) and [Angular](../../practice/frameworks/angular/using-nx-for-angular).</small>_
8-
97
## Creating a New Project
108

119
Module Federation provides the `create-module-federation` tool to create projects. You don't need to install it globally; you can directly use `npx` to run it on-demand.
@@ -164,7 +162,7 @@ export default createModuleFederationConfig({
164162
165163
## Existing project integration
166164
167-
If you want to integrate `Module Federation` into an existing project, you can refer to [docs](../../practice/frameworks/index).
165+
If you want to integrate `Module Federation` into an existing project, you can refer to [docs](../../practice/frameworks/overview).
168166
169167
## Summary
170168

apps/website-new/docs/en/practice/_meta.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,6 @@
1313
"type": "dir",
1414
"name": "frameworks",
1515
"label": "Frameworks",
16-
"collapsed": true
17-
},
18-
{
19-
"type": "dir",
20-
"name": "monorepos",
21-
"label": "Monorepos",
22-
"collapsed": true
23-
},
24-
{
25-
"type": "dir",
26-
"name": "scenario",
27-
"label": "Scenarios",
28-
"collapsed": true
29-
},
30-
{
31-
"type": "dir",
32-
"name": "performance",
33-
"label": "Performance"
16+
"collapsed": false
3417
}
3518
]
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[
22
{
33
"type": "file",
4-
"name": "index",
5-
"label": "Bridge overview"
4+
"name": "overview",
5+
"label": "Bridge Overview"
66
},
77
{
8-
"type": "file",
8+
"type": "dir",
99
"name": "react-bridge",
10-
"label": "React bridge",
11-
"collapsed": true
10+
"label": "React Bridge",
11+
"collapsed": false,
12+
"index": "getting-started"
1213
},
1314
{
1415
"type": "file",
1516
"name": "vue-bridge",
16-
"label": "Vue bridge",
17-
"collapsed": true
17+
"label": "Vue Bridge"
1818
}
1919
]

apps/website-new/docs/en/practice/bridge/index.mdx

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)