Skip to content

Commit c5d0aa4

Browse files
authored
fix(doc): fix markdown bug in compatibility.mdx (#7138)
1 parent 4b608cd commit c5d0aa4

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

packages/document/main-doc/docs/en/guides/advanced-features/compatibility.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Please refer to [Rsbuild - Browserslist](https://rsbuild.dev/guide/advanced/brow
2626

2727
### Polyfill At Compile
2828

29-
Modern.js defaults to importing corresponding polyfill code from [core-js] (https://github.com/zloirock/core-js) during compilation.
29+
Modern.js defaults to importing corresponding polyfill code from [core-js](https://github.com/zloirock/core-js) during compilation.
3030

3131
By default, the required Polyfill code will be introduced according to the settings of the Browserslist, so there is no need to worry about the Polyfill problem of the project source code and third-party dependencies, but because it contains some Polyfill code that is not used, the final bundle size may be increased.
3232

packages/document/main-doc/docs/en/guides/basic-features/data/data-fetch.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,10 @@ Having the `loader` function run only on the server in SSR applications brings s
149149
- **Simplifies usage**: Guarantees consistent data-fetching methods in SSR applications, so developers don't have to distinguish between client and server code.
150150
- **Reduces client bundle size**: Moves logic code and dependencies from the client to the server.
151151
- **Improves maintainability**: Less direct influence of data logic on front-end UI and avoids issues of accidentally including server dependencies in the client bundle or vice versa.
152+
152153
:::
153154

154-
We recommend using the `fetch` API in `loader` functions to make requests. Modern.js provides a default polyfill for the `fetch` API, allowing it to be used on the server. This means you can fetch data in a consistent manner whether in CSR or SSR:
155+
We recommend using the `fetch` API in `loader` functions to make requests. Since `fetch` works similarly on the client and server, you can fetch data in a consistent manner whether in CSR or SSR:
155156

156157
```tsx
157158
export async function loader() {

packages/document/main-doc/docs/en/guides/basic-features/render/ssr.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Server-Side Rendering
22

3-
Server-Side Rendering (SSR) involves rendering the HTML content of a webpage-side and then sending the fully-rendered page to the browser. The browser only needs to display the page without additional rendering.
3+
Server-Side Rendering (SSR) involves rendering the HTML content of a webpage server-side and then sending the fully-rendered page to the browser. The browser only needs to display the page without additional rendering.
44

55
The main advantages are:
66

@@ -320,4 +320,4 @@ In this case, the `epicMiddleware` instance is created outside the component, an
320320

321321
This code does not cause issues on the client-side. However, in SSR, the Middleware instance remains non-disposable. Each time the component renders, calling `epicMiddleware.run(rootEpic)` adds new event bindings internally, causing the entire object to grow continuously, ultimately affecting application performance.
322322

323-
Such issues are not easily noticed in CSR. When transitioning from CSR to SSR, if you're unsure whether your application has such hidden pitfalls, consider stress testing the application.
323+
Such issues are not easily noticed in CSR. When transitioning from CSR to SSR, if you're unsure whether your application has such hidden pitfalls, consider stress testing the application.

packages/document/main-doc/docs/en/guides/concept/entries.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ By default, Modern.js scans the files under `src/` before starting the project,
7676

7777
:::tip
7878

79-
- You can custom the recognition directory for page entries by using [source.entriesDir](/configure/app/source/entries-dir).
79+
- You can customize the recognition directory for page entries by using [source.entriesDir](/configure/app/source/entries-dir).
8080
- If you need to customize the entry points, please refer to [Custom Entries](#custom-entries).
8181

8282
:::

packages/document/main-doc/docs/en/tutorials/first-app/c05-loader.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ In the previous chapter, we learned how to add client route.
77

88
In this chapter, we will learn how to add **Loader** to the routing component.
99

10-
By far, we have provided data to components through hardcoding. If you want to get data from the remote, you usually use `useEffect` to do it. But when SSR is enabled, `useEffect` will not be executed at the server level, so this SSR can only render a very limited UI.
10+
So far, we have provided data to components through hardcoding. If you want to get data from the remote, you usually use `useEffect` to do it. But when SSR is enabled, `useEffect` will not be executed at the server level, so this SSR can only render a very limited UI.
1111

1212
Modern.js provides the ability of Data Loader to support homogeneous data acquisition in components to maximize the value of SSR.
1313

packages/generator/generators/entry-generator/templates/routes/page.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ const Index = () => (
7979
className="card"
8080
>
8181
<h2>
82-
Github
82+
GitHub
8383
<img
8484
className="arrow-right"
8585
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
8686
alt="Github"
8787
/>
8888
</h2>
89-
<p>View the source code of Github, feel free to contribute.</p>
89+
<p>View the source code on GitHub; feel free to contribute.</p>
9090
</a>
9191
</div>
9292
</main>

packages/runtime/plugin-runtime/src/router/runtime/plugin.node.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const routerPlugin = (
110110
basename: _basename,
111111
});
112112

113-
// We can't pass post request to query,due to post request would triger react-router submit action.
113+
// We can't pass post request to query,due to post request would trigger react-router submit action.
114114
// But user maybe do not define action for page.
115115
const remixRequest = createRemixReuqest(
116116
context.ssrContext!.request.raw,
@@ -145,13 +145,13 @@ export const routerPlugin = (
145145
}
146146

147147
const router = createStaticRouter(routes, routerContext);
148-
// routerContext is used in in css colletor、handle status code、inject loader data in html
148+
// routerContext is used in in css collector、handle status code、inject loader data in html
149149
context.routerContext = routerContext;
150150

151151
// private api, pass to React Component in `wrapRoot`
152152
// in the browser, we not need to pass router, cause we create Router in `wrapRoot`
153153
// but in node, we need to pass router, cause we need run async function, it can only run in `beforeRender`
154-
// when we deprected React 17, we can use Suspense to handle this async function
154+
// when we deprecated React 17, we can use Suspense to handle this async function
155155
// so the `remixRouter` has no type declare in RuntimeContext
156156
context.remixRouter = router;
157157

0 commit comments

Comments
 (0)