Skip to content

Commit c376d9c

Browse files
committed
createContext little modify
1 parent fc244c1 commit c376d9c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

โ€Žsrc/content/reference/react/createContext.mdโ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ const ThemeContext = createContext('light');
3737

3838
#### ๋ฐ˜ํ™˜๊ฐ’ {/*returns*/}
3939

40-
`createContext` returns a context object.
40+
`createContext`๋Š” ์ปจํ…์ŠคํŠธ ๊ฐ์ฒด๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
4141

4242
**์ปจํ…์ŠคํŠธ ๊ฐ์ฒด ์ž์ฒด๋Š” ์–ด๋– ํ•œ ์ •๋ณด๋„ ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.** ๋‹ค๋ฅธ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์ฝ๊ฑฐ๋‚˜ ์ œ๊ณตํ•˜๋Š” ์–ด๋–ค ์ปจํ…์ŠคํŠธ๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ์ƒ์œ„ ์ปดํฌ๋„ŒํŠธ์—์„œ ์ปจํ…์ŠคํŠธ ๊ฐ’์„ ์ง€์ •ํ•˜๊ธฐ ์œ„ํ•ด [`SomeContext`](#provider)๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , ์•„๋ž˜ ์ปดํฌ๋„ŒํŠธ์—์„œ ์ฝ๊ธฐ ์œ„ํ•ด [`useContext(SomeContext)`](/reference/react/useContext)๋ฅผ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค. ์ปจํ…์ŠคํŠธ ๊ฐ์ฒด์—๋Š” ๋ช‡ ๊ฐ€์ง€ ์†์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค.
4343

44-
* `SomeContext` lets you provide the context value to components.
44+
* `SomeContext`๋Š” ์ปดํฌ๋„ŒํŠธ์—๊ฒŒ ์ปจํ…์ŠคํŠธ ๊ฐ’์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
4545
* `SomeContext.Consumer`๋Š” ์ปจํ…์ŠคํŠธ ๊ฐ’์„ ์ฝ๋Š” ๋Œ€์•ˆ์ด๋ฉฐ ๋“œ๋ฌผ๊ฒŒ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
46-
* `SomeContext.Provider` is a legacy way to provide the context value before React 19.
46+
* `SomeContext.Provider`๋Š” React 19 ์ด์ „ ๋ฒ„์ „์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์˜ค๋ž˜๋œ ์ปจํ…์ŠคํŠธ ๊ฐ’ ์ œ๊ณต ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.
4747

4848
---
4949

50-
### `SomeContext` Provider {/*provider*/}
50+
### `SomeContext Provider` {/*provider*/}
5151

5252
์ปดํฌ๋„ŒํŠธ๋ฅผ ์ปจํ…์ŠคํŠธ ์ œ๊ณต์ž๋กœ ๊ฐ์‹ธ์„œ ์ด ์ปจํ…์ŠคํŠธ์˜ ๊ฐ’์„ ๋ชจ๋“  ๋‚ด๋ถ€ ์ปดํฌ๋„ŒํŠธ์— ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
5353

@@ -65,9 +65,9 @@ function App() {
6565

6666
<Note>
6767

68-
Starting in React 19, you can render `<SomeContext>` as a provider.
68+
React 19๋ถ€ํ„ฐ๋Š” `<SomeContext>`๋ฅผ ์ œ๊ณต์ž๋กœ ๋ Œ๋”๋ง ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
6969

70-
In older versions of React, use `<SomeContext.Provider>`.
70+
์˜ค๋ž˜๋œ React ๋ฒ„์ „์€ `<SomeContext.Provider>`๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
7171

7272
</Note>
7373

@@ -213,7 +213,7 @@ function App() {
213213

214214
## ๋ฌธ์ œ ํ•ด๊ฒฐ {/*troubleshooting*/}
215215

216-
### I can't find a way to change the context value {/*i-cant-find-a-way-to-change-the-context-value*/}
216+
### ์ปจํ…์ŠคํŠธ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ๋ฐฉ๋ฒ•์„ ๋ชจ๋ฅด๊ฒ ์–ด์š”. {/*i-cant-find-a-way-to-change-the-context-value*/}
217217

218218
์ด๋Ÿฐ ์ฝ”๋“œ๋Š” *๊ธฐ๋ณธ* ์ปจํ…์ŠคํŠธ ๊ฐ’์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
219219

0 commit comments

Comments
ย (0)