Skip to content

Commit 58c148d

Browse files
committed
docs: improve clarity in createInstance usage description
1 parent 2b7ce75 commit 58c148d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

apps/website-new/docs/en/guide/runtime/runtime-api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Used to create ModuleFederation instance.
1212

1313
* When to use `createInstance`?
1414

15-
To ensure the uniqueness of the ModuleFederation instance, after the build plugin creates an instance, it will be stored in memory. The exported APIs all first obtain the ModuleFederation instance from memory and then call the APIs of the ModuleFederation instance. This is also why APIs like loadRemote can be used directly from the `@module-federation/enhanced/runtime` package and inherently understand what application container they are attached to.
15+
To ensure the uniqueness of the ModuleFederation instance, after the build plugin creates an instance, it will be stored in memory. The exported APIs all first obtain the ModuleFederation instance from memory and then call the APIs of the ModuleFederation instance. This is also why APIs like loadRemote can be used directly from the `@module-federation/enhanced/runtime` package and inherently understand what application container they are attached to.
1616

17-
This singleton pattern works for most scenarios, but in the following cases, you need to use `createInstance`:
17+
This singleton pattern works for most scenarios, but in the following cases, you need to use `createInstance`:
1818

19-
- No build plugin is used (Only use runtime)
20-
- Multiple ModuleFederation instances need to be created with different configurations for each instance
21-
- You want to use ModuleFederation's partitioning feature to encapsulate corresponding APIs for use in other projects
19+
- No build plugin is used (Only use runtime)
20+
- Multiple ModuleFederation instances need to be created with different configurations for each instance
21+
- You want to use ModuleFederation's partitioning feature to encapsulate corresponding APIs for use in other projects
2222

2323
* `createInstance` will not overwrite an existing instance. Each call will create a new instance.
2424

0 commit comments

Comments
 (0)