Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2c78f6

Browse files
react-translations-botacdlitegaearoneltronixsophiebits
authored
Sync with react.dev @ ebc45f5 (#644)
* Next Channel -> Canary Channel (#5992) See facebook/react#26761 for more context. * Canaries blog post * Revert "Canaries blog post" This reverts commit aa88d8a. * Fixes grammar (#5967) * Canaries blog post (#5993) * Revert "Revert "Canaries blog post"" This reverts commit 9a865fd. * words --------- Co-authored-by: Sophie Alpert <[email protected]> * tweak * renderToReadableStream => renders a readable web stream (and not a Node.js stream) (#6001) * Update Profiler.md (#6000) * remove cancelled conference 2023 (#5999) * Minor tweak to remove implication that mounting can happen only once (#6003) Mounting with Suspense and Offscreen can happen multiple times. This removes some wording that implies a that effects / lifecycle hooks only happen on first mount. * Conditionally render offset div (#5997) Otherwise the address is being offset to the right when the refresh icon is not displayed * Remove unnecessary backticks breaking markdown highlighting (#6025) * resolve sync conflcit --------- Co-authored-by: Andrew Clark <[email protected]> Co-authored-by: Dan Abramov <[email protected]> Co-authored-by: Elton Maiyo <[email protected]> Co-authored-by: Sophie Alpert <[email protected]> Co-authored-by: Sébastien Lorber <[email protected]> Co-authored-by: declval <[email protected]> Co-authored-by: Hernani Fernandes <[email protected]> Co-authored-by: Jan Kassens <[email protected]> Co-authored-by: Sami Romdhana <[email protected]> Co-authored-by: Viacheslav Makarov <[email protected]> Co-authored-by: eomttt <[email protected]>
1 parent 2c73dee commit f2c78f6

12 files changed

+16
-16
lines changed

src/content/learn/removing-effect-dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ const options2 = { serverUrl: 'https://localhost:1234', roomId: 'music' };
882882

883883
// These are two different objects!
884884
console.log(Object.is(options1, options2)); // false
885-
````
885+
```
886886
887887
**Object and function dependencies can make your Effect re-synchronize more often than you need.**
888888
@@ -968,7 +968,7 @@ const roomId2 = 'music';
968968

969969
// These two strings are the same!
970970
console.log(Object.is(roomId1, roomId2)); // true
971-
````
971+
```
972972
973973
Thanks to this fix, the chat no longer re-connects if you edit the input:
974974

src/content/learn/separating-events-from-effects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function ChatRoom({ roomId, theme }) {
239239
});
240240
connection.connect();
241241
// ...
242-
````
242+
```
243243
244244
However, `theme` is a reactive value (it can change as a result of re-rendering), and [every reactive value read by an Effect must be declared as its dependency.](/learn/lifecycle-of-reactive-effects#react-verifies-that-you-specified-every-reactive-value-as-a-dependency) Now you have to specify `theme` as a dependency of your Effect:
245245
@@ -256,7 +256,7 @@ function ChatRoom({ roomId, theme }) {
256256
};
257257
}, [roomId, theme]); // ✅ All dependencies declared
258258
// ...
259-
````
259+
```
260260
261261
Play with this example and see if you can spot the problem with this user experience:
262262
@@ -416,7 +416,7 @@ function ChatRoom({ roomId, theme }) {
416416
showNotification('Connected!', theme);
417417
});
418418
// ...
419-
````
419+
```
420420
421421
Here, `onConnected` is called an *Effect Event.* It's a part of your Effect logic, but it behaves a lot more like an event handler. The logic inside it is not reactive, and it always "sees" the latest values of your props and state.
422422

src/content/learn/state-as-a-snapshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ label, textarea { margin-bottom: 10px; display: block; }
327327

328328
#### 신호등을 구현해봅시다 {/*implement-a-traffic-light*/}
329329

330-
다음은 버튼을 눌렀을 때 켜지는 횡단보도 조명 컴포넌트입니다.
330+
다음은 버튼을 토글되는 신호등 컴포넌트입니다.
331331

332332
<Sandpack>
333333

src/content/learn/updating-objects-in-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const nextPosition = {};
184184
nextPosition.x = e.clientX;
185185
nextPosition.y = e.clientY;
186186
setPosition(nextPosition);
187-
````
187+
```
188188

189189
위 코드는 아래처럼 작성할 수 있습니다.
190190

src/content/reference/react-dom/client/createRoot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ import { createRoot } from 'react-dom/client';
133133

134134
const root = createRoot(document.getElementById('root'));
135135
root.render(<App />);
136-
````
136+
```
137137
138138
Usually, you only need to run this code once at startup. It will:
139139
@@ -395,7 +395,7 @@ root.render(App);
395395

396396
// ✅ Correct: <App /> is a component.
397397
root.render(<App />);
398-
````
398+
```
399399
400400
Or if you pass a function to `root.render`, instead of the result of calling it:
401401

src/content/reference/react-dom/client/hydrateRoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ root.unmount();
124124
import { hydrateRoot } from 'react-dom/client';
125125

126126
hydrateRoot(document.getElementById('root'), <App />);
127-
````
127+
```
128128
129129
위 코드를 통해 서버 HTML을 <CodeStep step={1}>브라우저 DOM node</CodeStep>에서 <CodeStep step={2}>리액트 컴포넌트</CodeStep>를 이용해 hydrate 해줄 것 입니다. 주로 앱을 시작할 때 단 한 번 실행하게 될 것입니다. 프레임워크를 사용중이라면 프레임워크가 알아서 실행해 줄 것입니다.
130130

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Call `hydrate` to attach a <CodeStep step={1}>React component</CodeStep> into a
6868
import { hydrate } from 'react-dom';
6969

7070
hydrate(<App />, document.getElementById('root'));
71-
````
71+
```
7272
7373
Using `hydrate()` to render a client-only app (an app without server-rendered HTML) is not supported. Use [`render()`](/reference/react-dom/render) (in React 17 and below) or [`createRoot()`](/reference/react-dom/client/createRoot) (in React 18+) instead.
7474

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import { render } from 'react-dom';
7777
import App from './App.js';
7878

7979
render(<App />, document.getElementById('root'));
80-
````
80+
```
8181
8282
### 최상단 컴포넌트 렌더링하기 {/*rendering-the-root-component*/}
8383

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ render(<App />, rootNode);
6464

6565
// ...
6666
unmountComponentAtNode(rootNode);
67-
````
67+
```
6868

6969

7070
### Removing a React app from a DOM element {/*removing-a-react-app-from-a-dom-element*/}

src/content/reference/react/cloneElement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ With this approach, `Row` does not need to receive an `isHighlighted` prop at al
427427
export default function Row({ title }) {
428428
const isHighlighted = useContext(HighlightContext);
429429
// ...
430-
````
430+
```
431431
432432
This allows the calling component to not know or worry about passing `isHighlighted` to `<Row>`:
433433

0 commit comments

Comments
 (0)