You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/learn/add-react-to-an-existing-project.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,11 +44,9 @@ title: 기존 프로젝트에 React 추가하기
44
44
45
45
모듈 자바스크립트 환경은 모든 코드를 한 파일에 작성하는 것이 아닌, 각각의 React 컴포넌트를 개별 파일로 작성할 수 있게 합니다. 또한 (React 자체를 포함한) 다른 개발자들이 [npm](https://www.npmjs.com/) 레지스트리에 배포한 훌륭한 패키지들을 모두 사용할 수 있습니다. 이 작업을 수행하는 방법은 기존 설정에 따라 다릅니다.
46
46
47
-
<<<<<<< HEAD
48
47
***이미 애플리케이션이 `import` 문을 이용해 파일로 분리하고 있다면** 기존에 가지고 있는 설정을 이용해 보세요. JS 코드에서 `<div />`를 작성하면 문법 오류가 발생하는지 확인해 보세요. 문법 오류가 발생한다면 [Babel을 이용한 자바스크립트 코드 변환](https://babeljs.io/setup)이 필요할 수 있으며, JSX를 사용하려면 [Babel React 프리셋](https://babeljs.io/docs/babel-preset-react)을 활성화해야 할 수도 있습니다.
49
-
=======
48
+
50
49
***If your app doesn't have an existing setup for compiling JavaScript modules,** set it up with [Vite](https://vite.dev/). The Vite community maintains [many integrations with backend frameworks](https://github.com/vitejs/awesome-vite#integrations-with-backends), including Rails, Django, and Laravel. If your backend framework is not listed, [follow this guide](https://vite.dev/guide/backend-integration.html) to manually integrate Vite builds with your backend.
51
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
52
50
53
51
***애플리케이션이 자바스크립트 모듈을 컴파일하기 위한 기존 설정이 없다면,**[Vite](https://vitejs.dev/)를 이용하여 설정하세요. Vite 커뮤니티는 Rails, Django, Laravel을 포함한 [다양한 백엔드 프레임워크와의 통합](https://github.com/vitejs/awesome-vite#integrations-with-backends)을 지원하고 있습니다. 사용 중인 백엔드 프레임워크가 목록에 없다면 [가이드를 참고하여](https://vitejs.dev/guide/backend-integration.html) Vite 빌드를 백엔드와 수동으로 통합하세요.
54
52
@@ -67,11 +65,7 @@ npm install react react-dom
67
65
<html>
68
66
<head><title>My app</title></head>
69
67
<body>
70
-
<<<<<<< HEAD
71
68
<!-- 기존 페이지 컨텐츠 (이 예시에서는 이 부분이 대체됩니다)-->
72
-
=======
73
-
<!-- Your existing page content (in this example, it gets replaced) -->
처음으로 기존 프로젝트에 모듈 자바스크립트 환경을 통합하기는 다소 어려워 보일 수 있으나, 그만한 가치가 있는 일입니다! 어려움을 겪는 부분이 있다면 [커뮤니티 리소스](/community)나 [Vite 채팅](https://chat.vitejs.dev/)을 이용해 보세요.
99
-
=======
92
+
100
93
Integrating a modular JavaScript environment into an existing project for the first time can feel intimidating, but it's worth it! If you get stuck, try our [community resources](/community) or the [Vite Chat](https://chat.vite.dev/).
Copy file name to clipboardExpand all lines: src/content/learn/installation.md
+1-11Lines changed: 1 addition & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@ React는 처음부터 점진적으로 적용할 수 있도록 설계되었으며
8
8
9
9
</Intro>
10
10
11
-
<<<<<<< HEAD
12
11
<YouWillLearnisChapter={true}>
13
12
14
13
*[새로운 React 프로젝트를 시작하는 방법](/learn/start-a-new-react-project)
@@ -19,9 +18,6 @@ React는 처음부터 점진적으로 적용할 수 있도록 설계되었으며
19
18
</YouWillLearn>
20
19
21
20
## React 시도하기 {/*try-react*/}
22
-
=======
23
-
## Try React {/*try-react*/}
24
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
25
21
26
22
단순히 React를 사용해 보고 싶다면, 아무것도 설치할 필요 없습니다. 이 샌드박스를 통해 사용해 보세요!
27
23
@@ -43,15 +39,14 @@ export default function App() {
43
39
44
40
React 문서의 대부분 페이지에는 이와 같은 샌드박스가 있습니다. React 문서 외에도 [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), [CodePen](https://codepen.io/pen?template=QWYVwWN) 등의 온라인 샌드박스에서 React를 지원합니다.
45
41
46
-
<<<<<<< HEAD
47
42
### 로컬 환경에서 React 시도하기 {/*try-react-locally*/}
48
43
49
44
컴퓨터의 로컬 환경에서 React를 사용해 보고 싶다면, 이 [HTML 페이지를 다운로드](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html)하고 에디터와 브라우저에서 열어보세요!
50
45
51
46
## 새로운 React 프로젝트 시작하기 {/*start-a-new-react-project*/}
52
47
53
48
React로 완전히 앱이나 웹사이트를 구축하고 싶다면, [새로운 React 프로젝트를 시작](/learn/start-a-new-react-project)하세요.
54
-
=======
49
+
55
50
To try React locally on your computer, [download this HTML page.](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html) Open it in your editor and in your browser!
56
51
57
52
## Creating a React App {/*creating-a-react-app*/}
@@ -61,15 +56,10 @@ If you want to start a new React app, you can [create a React app](/learn/creati
61
56
## Build a React App from Scratch {/*build-a-react-app-from-scratch*/}
62
57
63
58
If a framework is not a good fit for your project, you prefer to build your own framework, or you just want to learn the basics of a React app you can [build a React app from scratch](/learn/build-a-react-app-from-scratch).
64
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
65
59
66
60
## 기존 프로젝트에 React 추가하기 {/*add-react-to-an-existing-project*/}
67
61
68
-
<<<<<<< HEAD
69
62
기존 앱이나 웹사이트에 React를 적용하고 싶다면, [기존 프로젝트에 React를 추가](/learn/add-react-to-an-existing-project)하세요.
70
-
=======
71
-
If want to try using React in your existing app or a website, you can [add React to an existing project.](/learn/add-react-to-an-existing-project)
Copy file name to clipboardExpand all lines: src/content/learn/passing-data-deeply-with-context.md
+4-12Lines changed: 4 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -476,11 +476,9 @@ export default function Section({ level, children }) {
476
476
}
477
477
```
478
478
479
-
<<<<<<< HEAD
480
479
이것은 React에게 `Section` 내의 어떤 컴포넌트가 `LevelContext`를 요구하면 `level`을 주라고 알려줍니다. 컴포넌트는 그 위에 있는 UI 트리에서 가장 가까운 `<LevelContext.Provider>`의 값을 사용합니다.
481
-
=======
480
+
482
481
This tells React: "if any component inside this `<Section>` asks for `LevelContext`, give them this `level`." The component will use the value of the nearest `<LevelContext>` in the UI tree above it.
@@ -883,7 +878,7 @@ Context는 정적인 값으로 제한되지 않습니다. 다음 렌더링 시
883
878
- Context는 중간의 어떤 컴포넌트도 지나갈 수 있습니다.
884
879
- Context를 활용해 "주변에 적응하는" 컴포넌트를 작성할 수 있습니다.
885
880
- Context를 사용하기 전에 props를 전달하거나 JSX를 `children`으로 전달하는 것을 먼저 시도해보세요.
886
-
=======
881
+
887
882
* Context lets a component provide some information to the entire tree below it.
888
883
* To pass context:
889
884
1. Create and export it with `exportconstMyContext=createContext(defaultValue)`.
@@ -892,7 +887,6 @@ Context는 정적인 값으로 제한되지 않습니다. 다음 렌더링 시
892
887
* Context passes through any components in the middle.
893
888
* Context lets you write components that "adapt to their surroundings".
894
889
* Before you use context, try passing props or passing JSX as `children`.
895
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
896
890
897
891
</Recap>
898
892
@@ -1043,11 +1037,9 @@ li {
1043
1037
1044
1038
`imageSize` prop을 모든 컴포넌트에서 제거합니다.
1045
1039
1046
-
<<<<<<< HEAD
1047
1040
`Context.js`에 `ImageSizeContext`를 생성하고 내보냅니다. 리스트를 `<ImageSizeContext.Provider value={imageSize}>`로 감싸 값을 아래로 전달하고 `useContext(ImageSizeContext)`로 `PlaceImage`에서 그것을 읽습니다.
1048
-
=======
1041
+
1049
1042
Create and export `ImageSizeContext` from `Context.js`. Then wrap the List into `<ImageSizeContext value={imageSize}>` to pass the value down, and `useContext(ImageSizeContext)` to read it in the `PlaceImage`:
Copy file name to clipboardExpand all lines: src/content/learn/render-and-commit.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,11 +84,7 @@ export default function Image() {
84
84
85
85
재귀적 단계: 업데이트된 컴포넌트가 다른 컴포넌트를 반환하면 React는 다음으로 _해당_ 컴포넌트를 렌더링하고 해당 컴포넌트도 컴포넌트를 반환하면 _반환된_ 컴포넌트를 다음에 렌더링하는 방식입니다. 중첩된 컴포넌트가 더 이상 없고 React가 화면에 표시되어야 하는 내용을 정확히 알 때까지 이 단계는 계속됩니다.
86
86
87
-
<<<<<<< HEAD
88
87
다음 예시에서 React는 `Gallery()`와 `Image()`를 여러 번 호출합니다.
89
-
=======
90
-
In the following example, React will call `Gallery()` and `Image()` several times:
***초기 렌더링의 경우** React는 [`appendChild()`](https://developer.mozilla.org/docs/Web/API/Node/appendChild) DOM API를 사용하여 생성한 모든 DOM 노드를 화면에 표시합니다.
159
154
***리렌더링의 경우** React는 필요한 최소한의 작업(렌더링하는 동안 계산된 것!)을 적용하여 DOM이 최신 렌더링 출력과 일치하도록 합니다.
160
-
=======
155
+
161
156
After rendering (calling) your components, React will modify the DOM.
162
157
163
158
***For the initial render,** React will use the [`appendChild()`](https://developer.mozilla.org/docs/Web/API/Node/appendChild) DOM API to put all the DOM nodes it has created on screen.
164
159
***For re-renders,** React will apply the minimal necessary operations (calculated while rendering!) to make the DOM match the latest rendering output.
165
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
166
160
167
161
**React는 렌더링 간에 차이가 있는 경우에만 DOM 노드를 변경합니다.** 예를 들어 매초 부모로부터 전달된 다른 props로 다시 렌더링하는 컴포넌트가 있습니다. `<input>`에 텍스트를 입력하여 `value`를 업데이트 하지만 컴포넌트가 리렌더링될 때 텍스트가 사라지지 않습니다.
Copy file name to clipboardExpand all lines: src/content/learn/state-a-components-memory.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1450,11 +1450,9 @@ export default function FeedbackForm() {
1450
1450
1451
1451
#### 불필요한 state 제거하기 {/*remove-unnecessary-state*/}
1452
1452
1453
-
<<<<<<< HEAD
1454
1453
이 예시에서 버튼이 클릭 되면 사용자의 이름을 요청하고 그런 다음 환영 메시지를 표시해야 합니다. 이름을 유지하기 위해 state를 사용하려고 했지만, 어떤 이유로 항상 "Hello, !"라고 표시됩니다.
1455
-
=======
1454
+
1456
1455
When the button is clicked, this example should ask for the user's name and then display an alert greeting them. You tried to use state to keep the name, but for some reason the first time it shows "Hello, !", and then "Hello, [name]!" with the previous input every time after.
1457
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
1458
1456
1459
1457
이 코드를 수정하려면 불필요한 state 변수를 제거하세요. ([왜 이것이 작동하지 않는지](/learn/state-as-a-snapshot)에 대해서는 나중에 설명하겠습니다.)
1. `handleClick`은 인수 `0`을 사용하여 `squares` 배열의 첫 번째 엘리먼트를 `null`에서 `X`로 업데이트합니다.
1334
1331
1. `Board` 컴포넌트의 `squares` state가 업데이트되어 `Board`와 그 모든 자식이 다시 렌더링 됩니다. 이에 따라 인덱스가 `0`인 `Square` 컴포넌트의 `value` prop가 `null`에서 `X`로 변경됩니다.
1335
1332
1336
-
<<<<<<< HEAD
1337
1333
최종적으로 사용자는 왼쪽 위 사각형을 클릭한 후 비어있는 사각형이 `X`로 변경된 것을 확인할 수 있습니다.
1338
-
=======
1339
-
In the end the user sees that the upper left square has changed from empty to having an `X` after clicking it.
1340
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
1341
1334
1342
1335
<Note>
1343
1336
@@ -1418,11 +1411,8 @@ export default function Board() {
1418
1411
1419
1412
`O`가 `X`를 덮어씌웁니다! 이렇게 하면 게임이 좀 더 흥미로워질 수 있지만 지금은 원래의 규칙을 유지하겠습니다.
1420
1413
1421
-
<<<<<<< HEAD
1422
1414
지금은 `X`와 `O`로 사각형을 표시할 때 먼저 해당 사각형에 이미 `X` 또는 `O`값이 있는지 확인하고 있지 않습니다. *일찍이 돌아와서* 이 문제를 해결하기 위해 사각형에 이미 `X`와 `O`가 있는지 확인하겠습니다. 사각형이 이미 채워져 있는 경우 보드의 state를 업데이트하기 전에 `handleClick` 함수에서 조기에 `return` 하겠습니다.
1423
-
=======
1424
1415
When you mark a square with an `X` or an `O` you aren't first checking to see if the square already has an `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has an `X` or an `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
1425
-
>>>>>>> ab18d2f0f5151ab0c927a12eb0a64f8170762eff
1426
1416
1427
1417
```js {2,3,4}
1428
1418
functionhandleClick(i) {
@@ -1572,11 +1562,8 @@ function calculateWinner(squares) {
1572
1562
1573
1563
</Note>
1574
1564
1575
-
<<<<<<< HEAD
1576
1565
`Board` 컴포넌트의 `handleClick` 함수에서 `calculateWinner(squares)`를 호출하여 플레이어가 이겼는지 확인하세요. 이 검사는 사용자가 이미 `X` 또는 `O`가 있는 사각형을 클릭했는지를 확인하는 것과 동시에 수행할 수 있습니다. 두 경우 모두 함수를 조기 반환하겠습니다.
1577
-
=======
1578
1566
You will call `calculateWinner(squares)` in the `Board` component's `handleClick` function to check if a player has won. You can perform this check at the same time you check if a user has clicked a square that already has an `X` or an `O`. We'd like to return early in both cases:
0 commit comments