Skip to content

Commit 4df3124

Browse files
authored
Fix caps for React concepts (#6712)
1 parent d661678 commit 4df3124

20 files changed

+107
-106
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Ignore this rule if you're specifically describing an experimental proposal. Mak
7979
- Use semicolons.
8080
- No space between function names and parens (`method() {}` not `method () {}`).
8181
- When in doubt, use the default style favored by [Prettier](https://prettier.io/playground/).
82+
- Always capitalize React concepts such as Hooks, Effects, and Transitions.
8283

8384
### Highlighting
8485

src/content/learn/manipulating-the-dom-with-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ In general, you [don't want](/learn/referencing-values-with-refs#best-practices-
493493

494494
React sets `ref.current` during the commit. Before updating the DOM, React sets the affected `ref.current` values to `null`. After updating the DOM, React immediately sets them to the corresponding DOM nodes.
495495

496-
**Usually, you will access refs from event handlers.** If you want to do something with a ref, but there is no particular event to do it in, you might need an Effect. We will discuss effects on the next pages.
496+
**Usually, you will access refs from event handlers.** If you want to do something with a ref, but there is no particular event to do it in, you might need an Effect. We will discuss Effects on the next pages.
497497

498498
<DeepDive>
499499

src/content/reference/react-dom/flushSync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Most of the time, `flushSync` can be avoided. Use `flushSync` as last resort.
5353

5454
* `flushSync` can significantly hurt performance. Use sparingly.
5555
* `flushSync` may force pending Suspense boundaries to show their `fallback` state.
56-
* `flushSync` may run pending effects and synchronously apply any updates they contain before returning.
56+
* `flushSync` may run pending Effects and synchronously apply any updates they contain before returning.
5757
* `flushSync` may flush updates outside the callback when necessary to flush the updates inside the callback. For example, if there are pending updates from a click, React may flush those before flushing the updates inside the callback.
5858

5959
---

src/content/reference/react-dom/hydrate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ This only works one level deep, and is intended to be an escape hatch. Don’t o
152152
153153
### Handling different client and server content {/*handling-different-client-and-server-content*/}
154154
155-
If you intentionally need to render something different on the server and the client, you can do a two-pass rendering. Components that render something different on the client can read a [state variable](/reference/react/useState) like `isClient`, which you can set to `true` in an [effect](/reference/react/useEffect):
155+
If you intentionally need to render something different on the server and the client, you can do a two-pass rendering. Components that render something different on the client can read a [state variable](/reference/react/useState) like `isClient`, which you can set to `true` in an [Effect](/reference/react/useEffect):
156156
157157
<Sandpack>
158158

src/content/reference/react-dom/preconnect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The `preconnect` function provides the browser with a hint that it should open a
5555
#### Caveats {/*caveats*/}
5656

5757
* Multiple calls to `preconnect` with the same server have the same effect as a single call.
58-
* In the browser, you can call `preconnect` in any situation: while rendering a component, in an effect, in an event handler, and so on.
58+
* In the browser, you can call `preconnect` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
5959
* In server-side rendering or when rendering Server Components, `preconnect` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
6060
* If you know the specific resources you'll need, you can call [other functions](/reference/react-dom/#resource-preloading-apis) instead that will start loading the resources right away.
6161
* There is no benefit to preconnecting to the same server the webpage itself is hosted from because it's already been connected to by the time the hint would be given.

src/content/reference/react-dom/prefetchDNS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The prefetchDNS function provides the browser with a hint that it should look up
5454
#### Caveats {/*caveats*/}
5555

5656
* Multiple calls to `prefetchDNS` with the same server have the same effect as a single call.
57-
* In the browser, you can call `prefetchDNS` in any situation: while rendering a component, in an effect, in an event handler, and so on.
57+
* In the browser, you can call `prefetchDNS` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
5858
* In server-side rendering or when rendering Server Components, `prefetchDNS` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
5959
* If you know the specific resources you'll need, you can call [other functions](/reference/react-dom/#resource-preloading-apis) instead that will start loading the resources right away.
6060
* There is no benefit to prefetching the same server the webpage itself is hosted from because it's already been looked up by the time the hint would be given.

src/content/reference/react-dom/preinit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The `preinit` function provides the browser with a hint that it should start dow
6767
#### Caveats {/*caveats*/}
6868

6969
* Multiple calls to `preinit` with the same `href` have the same effect as a single call.
70-
* In the browser, you can call `preinit` in any situation: while rendering a component, in an effect, in an event handler, and so on.
70+
* In the browser, you can call `preinit` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
7171
* In server-side rendering or when rendering Server Components, `preinit` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7272

7373
---

src/content/reference/react-dom/preinitModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The `preinitModule` function provides the browser with a hint that it should sta
6565
#### Caveats {/*caveats*/}
6666

6767
* Multiple calls to `preinitModule` with the same `href` have the same effect as a single call.
68-
* In the browser, you can call `preinitModule` in any situation: while rendering a component, in an effect, in an event handler, and so on.
68+
* In the browser, you can call `preinitModule` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
6969
* In server-side rendering or when rendering Server Components, `preinitModule` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7070

7171
---

src/content/reference/react-dom/preload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The `preload` function provides the browser with a hint that it should start dow
7272
* Multiple equivalent calls to `preload` have the same effect as a single call. Calls to `preload` are considered equivalent according to the following rules:
7373
* Two calls are equivalent if they have the same `href`, except:
7474
* If `as` is set to `image`, two calls are equivalent if they have the same `href`, `imageSrcSet`, and `imageSizes`.
75-
* In the browser, you can call `preload` in any situation: while rendering a component, in an effect, in an event handler, and so on.
75+
* In the browser, you can call `preload` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
7676
* In server-side rendering or when rendering Server Components, `preload` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7777

7878
---

src/content/reference/react-dom/preloadModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The `preloadModule` function provides the browser with a hint that it should sta
6666
#### Caveats {/*caveats*/}
6767

6868
* Multiple calls to `preloadModule` with the same `href` have the same effect as a single call.
69-
* In the browser, you can call `preloadModule` in any situation: while rendering a component, in an effect, in an event handler, and so on.
69+
* In the browser, you can call `preloadModule` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
7070
* In server-side rendering or when rendering Server Components, `preloadModule` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7171

7272
---

0 commit comments

Comments
 (0)