Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/learn/synchronizing-with-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ A common pitfall for preventing Effects firing twice in development is to use a
```js {1,3-4}
const connectionRef = useRef(null);
useEffect(() => {
// 🚩 This wont fix the bug!!!
// 🚩 This won't fix the bug!!!
if (!connectionRef.current) {
connectionRef.current = createConnection();
connectionRef.current.connect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,5 @@ If you await a Promise, React will display duration of that Promise. To see all

Different colors are used to indicate the duration of the component render. The darker the color, the longer the duration.

The Server Components track group will always contain a "Primary" track. If React is able to render Server Components concurrently, it will display addititional "Parallel" tracks.
The Server Components track group will always contain a "Primary" track. If React is able to render Server Components concurrently, it will display additional "Parallel" tracks.
If more than 8 Server Components are rendered concurrently, React will associate them with the last "Parallel" track instead of adding more tracks.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function Component({user}) {
}
```

If the side effect sychronizes React state with some external state (or vice versa), use `useEffect`:
If the side effect synchronizes React state with some external state (or vice versa), use `useEffect`:

```js
// ✅ Good: Synchronization in useEffect
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/client/createRoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ const container = document.getElementById("root");
const root = createRoot(container, {
// Keep in mind to remove these options in development to leverage
// React's default handlers or implement your own overlay for development.
// The handlers are only specfied unconditionally here for demonstration purposes.
// The handlers are only specified unconditionally here for demonstration purposes.
onCaughtError: onCaughtErrorProd,
onRecoverableError: onRecoverableErrorProd,
onUncaughtError: onUncaughtErrorProd,
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/client/hydrateRoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ const container = document.getElementById("root");
hydrateRoot(container, <App />, {
// Keep in mind to remove these options in development to leverage
// React's default handlers or implement your own overlay for development.
// The handlers are only specfied unconditionally here for demonstration purposes.
// The handlers are only specified unconditionally here for demonstration purposes.
onCaughtError: onCaughtErrorProd,
onRecoverableError: onRecoverableErrorProd,
onUncaughtError: onUncaughtErrorProd,
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/flushSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ useEffect(() => {
}, []);
```

This will allow the current render to finish and schedule another syncronous render to flush the updates.
This will allow the current render to finish and schedule another synchronous render to flush the updates.

<Pitfall>

Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/server/resume.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ async function main(frame) {
// Layer 2
// Just waiting here for demonstration purposes.
// In a real app, the prelude and postponed state would've been serialized in Layer 1 and Layer would deserialize them.
// The prelude content could be flushed immediated as plain HTML while
// The prelude content could be flushed immediately as plain HTML while
// React is continuing to render from where the prerender left off.
await sleep(2000);

Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react/StrictMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ li {

</Sandpack>

Now on inital mount in StrictMode, the ref callbacks are all setup, cleaned up, and setup again:
Now on initial mount in StrictMode, the ref callbacks are all setup, cleaned up, and setup again:

```
...
Expand Down
Loading