Skip to content

4-5 lifecycle of reactive effects #5861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4c874b1
quickStart - translate and add comments
roy-jung Mar 29, 2023
ef55d09
Add Translated Title
bingwer Mar 29, 2023
17a35b4
Fix type
bingwer Mar 29, 2023
4211ffa
Synchronizing from Notion : passing data depply with context
bingwer Mar 29, 2023
b07b0ce
번역된 타이틀 추가 (#69)
roy-jung Mar 29, 2023
7a9fb6b
Merge branch 'develop' into translate-passing-data-deeply-with-context
roy-jung Mar 29, 2023
c2a5e43
Synchronizing from Notion : passing data depply with context (#70)
roy-jung Mar 29, 2023
75d3c50
Synchronizing from Notion: scaling up with reducer and context
samseburn Mar 29, 2023
5dd14c7
Synchronizing from Notion : Extracting State Logic into a Reducer
bingwer Mar 29, 2023
37cdc18
Fix upper case
bingwer Mar 29, 2023
b210b99
add 'Trans' & 'TransBlock' Component for translation
roy-jung Mar 29, 2023
3f56465
add 'Trans' & 'TransBlock' Component for translation (#73)
roy-jung Mar 29, 2023
eac0201
translate quickStart, add 'extraComment' component
roy-jung Mar 29, 2023
59d419e
Merge branch 'develop' of https://github.com/roy-jung/react.dev.ko in…
roy-jung Mar 29, 2023
4f463f3
apply Trans tag
roy-jung Mar 29, 2023
e653064
quickStart 번역 수정, 'ExtraComment' 컴포넌트 추가 (#74)
roy-jung Mar 30, 2023
66bd3df
Synchronizing from Notion: scaling up with reducer and context (#71)
roy-jung Mar 30, 2023
8f7a68a
Synchronizing from Notion : Extracting State Logic into a Reducer (#72)
roy-jung Mar 30, 2023
f56ed86
목록 번역 기능 추가, 메인페이지 번역
roy-jung Mar 30, 2023
ab9cb5b
목록 번역 기능 추가, 메인페이지 번역 (#75)
roy-jung Mar 30, 2023
5c5cbbd
Preserving and Resetting State 번역
roy-jung Mar 30, 2023
5bf1aee
Preserving and Resetting State 번역 (#76)
roy-jung Mar 30, 2023
4ceaf49
fix minor translation
roy-jung Mar 30, 2023
4b6fe62
README 작성, 번역컴포넌트 <br/> 안쓰도록 수정
roy-jung Mar 31, 2023
deeea94
README 작성, 번역컴포넌트 <br/> 안쓰도록 수정 (#77)
roy-jung Mar 31, 2023
6a9f313
fix 'you will learn' line break
roy-jung Mar 31, 2023
30d44d1
fix challenge translation style
roy-jung Mar 31, 2023
979b2fb
4. escape hatches
roy-jung Mar 31, 2023
795e7ec
4-1 referencing values with refs
roy-jung Mar 31, 2023
aa03a4c
4. escape hatches (#110)
roy-jung Mar 31, 2023
5e58ef3
Merge branch 'develop' of https://github.com/roy-jung/react.dev.ko in…
roy-jung Mar 31, 2023
0c8268b
[4-1] referencing values with refs 번역 반영 (#111)
roy-jung Mar 31, 2023
be26b1a
1-3 Writing Markup with JSX 번역
nara04040 Mar 31, 2023
285b73d
Merge branch 'develop' of https://github.com/roy-jung/react.dev.ko in…
roy-jung Mar 31, 2023
3003044
문법 수정 및 동기화
roy-jung Mar 31, 2023
e33c420
1-3 Writing Markup with JSX 번역 (#112)
roy-jung Mar 31, 2023
fb1fc22
4-2 manipulating the dom with refs
roy-jung Apr 1, 2023
e3133f4
Synchronizing from Notion: Reusing Logic with Custom Hooks
samseburn Apr 1, 2023
d91900b
4-4 you might not need an effect
roy-jung Apr 1, 2023
851e00a
상태 -> state, 사용자정의훅 -> 커스텀훅
roy-jung Apr 1, 2023
497292d
4-2 manipulating the dom with refs (#113)
roy-jung Apr 1, 2023
73da2c0
Synchronizing from Notion: Reusing Logic with Custom Hooks (#114)
roy-jung Apr 1, 2023
da5b341
4-4 you might not need an effect (#115)
roy-jung Apr 1, 2023
e686ff9
toc scroll-spy 기능 수정
roy-jung Apr 2, 2023
65e58f5
참조 -> ref. 날것 -> 원시. 누락된 번역 추가
roy-jung Apr 2, 2023
5314ac3
upload 4-5 lifecycle of reactive effects
Apr 2, 2023
33e7913
fix details
Apr 2, 2023
740f7a1
번역 오류 및 누락부분 수정
roy-jung Apr 3, 2023
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
118 changes: 112 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,111 @@
# react.dev
# react-ko.vercel.app 리액트 공식문서 비공식 번역 사이트

This repo contains the source code and documentation powering [react.dev](https://react.dev/).
[react.dev](https://react.dev/)를 fork하여 작성한 리파지토리입니다.
스터디그룹에서 한글 번역을 진행하고 있고,
유튜브 [FE재남](https://www.youtube.com/playlist?list=PLjQV3hketAJkh6BEl0n4PDS_2fBd0cS9v)에 스터디 영상을 공개하고 있습니다.

## PR 작성 규칙

1. `develop` 브랜치를 기준으로 로컬 브랜치를 만듭니다.
_[your-own-branch-name] 부분에 원하는 이름을 넣으세요. 대괄호(`[ ]`)는 없어야 합니다._

```bash
/develop/> git pull origin develop
/develop/> git switch -c "[your-own-branch-name]"
```

2. 작업을 마치면 해당 브랜치를 `push`합니다.

```bash
/[your-own-branch-name]/> git add .
/[your-own-branch-name]/> git commit -m "커밋메시지 자유롭게 작성"
/[your-own-branch-name]/> git push origin [your-own-branch-name]
```

3. 깃헙에서 `New Pull Request`를 하세요.

- base repository: **"roy-jung/react.dev.ko"** 로 바꿔주세요.
- compare: **develop** 브랜치로 바꿔주세요.

## 번역 규칙

<blockquote>
<h3>TL;DR</h3>

1. 문서 제목: title 아래에 `translatedTitle: 번역제목`
2. 일반 번역: `<Trans>번역내용</Trans>`
3. 블록 단위 번역: `<TransBlock>번역내용</TransBlock>`
4. 소제목 번역: 원문과 {/...} 사이에 `<Trans>번역제목</Trans>`
5. 추가 코멘트: `<Extra>코멘트 내용</Extra>`

</blockquote>

1. 각 문서의 title 아래에 `translatedTitle`을 추가합니다.

```markdown
---
title: Scaling Up with Reducer and Context
translatedTitle: Reducer와 Context로 확장하기
---
```

2. 각 **문단** 바로 다음줄에 `<Trans>번역내용</Trans>`과 같이 번역글을 작성합니다.

```markdown
Reducers let you consolidate a component's state update logic. Context lets you pass information deep down to other components. You can combine reducers and context together to manage state of a complex screen.
<Trans>Reducer를 사용하면 컴포넌트의 state 업데이트 로직을 통합할 수 있습니다. Context를 사용하면 다른 컴포넌트들에 정보를 전달할 수 있습니다. Reducer와 context를 함께 사용하여 복잡한 화면의 state를 관리할 수 있습니다.</Trans>
```

3. 목록 및 기타 블록 단위의 번역이 필요한 경우, `<TransBlock>번역내용</TransBlock>`와 같이 작성합니다.

```markdown
<YouWillLearn>

- How to combine a reducer with context
- How to avoid passing state and dispatch through props
- How to keep context and state logic in a separate file

<TransBlock>
* reducer와 context를 결합하는 방법
* state와 dispatch 함수를 prop으로 전달하지 않는 방법
* context와 state 로직을 별도의 파일에서 관리하는 방법
</TransBlock>

</YouWillLearn>
```

4. 각 소제목 뒤, hash표시 앞 부분에 번역제목을 추가합니다.

```markdown
<!-- from -->

### Step 1: Create the context {/_step-1-create-the-context_/}

<!-- to -->

### Step 1: Create the context<Trans>Context 생성하기</Trans> {/_step-1-create-the-context_/}
```

5. 목록 아이템의 글이 지나치게 길어 아이템별로 바로 이어서 번역글을 작성하는 것이 가독성 측면에서 더 나은 경우 등에는 각 목록 아이템 바로 밑에 번역글을 작성합니다.

```markdown
- **Code size:** Generally, with `useState` you have to write less code upfront. With `useReducer`, you have to write both a reducer function _and_ dispatch actions. However, `useReducer` can help cut down on the code if many event handlers modify state in a similar way.
<Trans>**코드 크기:** 일반적으로 `useState`를 사용하면 미리 작성해야 하는 코드가 줄어듭니다. `useReducer`를 사용하면 reducer 함수 _와_ action을 전달하는 부분 모두 작성해야 합니다. 하지만 많은 이벤트 핸들러가 비슷한 방식으로 state를 업데이트하는 경우 `useReducer`를 사용하면 코드를 줄이는 데 도움이 될 수 있습니다.</Trans>
- **Readability:** `useState` is very easy to read when the state updates are simple. When they get more complex, they can bloat your component's code and make it difficult to scan. In this case, `useReducer` lets you cleanly separate the _how_ of update logic from the _what happened_ of event handlers.
<Trans>**가독성:** `useState`로 간단한 state를 업데이트 하는 경우 가독성이 좋습니다. 그렇지만 state의 구조가 더욱 복잡해지면, 컴포넌트의 코드의 양이 부풀어 오르고 한눈에 읽기 어려워질 수 있습니다. 이 경우 `useReducer`를 사용하면 업데이트 로직이 _어떻게 동작_ 하는지와 이벤트 핸들러를 통해 _무엇이 일어났는지_ 를 깔끔하게 분리할 수 있습니다.</Trans>
```

5. 추가 코멘트(원문에 없는 내용)는 `<Extra>내용</Extra>`와 같이 작성합니다.

```
<Extra>

#### 다양한 방법으로 컴포넌트 추가하기 - @이승효 {/_다양한-방법으로-컴포넌트-추가하기---이승효_/}

React 컴포넌트는 항상 대문자로 시작해야 하지만, 함수명이 대문자일 필요는 없습니다. **그러나 JSX 안에서 컴포넌트가 사용될 때에는 반드시 대문자로 시작해야 한다는 것에 유의하세요.**

</Extra>
```

## Getting started

Expand All @@ -15,7 +120,7 @@ This repo contains the source code and documentation powering [react.dev](https:
### Installation

1. `cd react.dev` to go into the project root
3. `yarn` to install the website's npm dependencies
2. `yarn` to install the website's npm dependencies

### Running locally

Expand All @@ -38,9 +143,9 @@ The documentation is divided into several sections with a different tone and pur

1. Follow the ["Running locally"](#running-locally) instructions
1. Save the files and check in the browser
1. Changes to React components in `src` will hot-reload
1. Changes to markdown files in `content` will hot-reload
1. If working with plugins, you may need to remove the `.cache` directory and restart the server
1. Changes to React components in `src` will hot-reload
1. Changes to files in `content` will hot-reload
1. If working with plugins, you may need to remove the `.cache` directory and restart the server

### Test the change

Expand All @@ -60,4 +165,5 @@ The documentation is divided into several sections with a different tone and pur
If you are interested in translating `react.dev`, please see the current translation efforts [here](https://github.com/reactjs/react.dev/issues/4135).

## License

Content submitted to [react.dev](https://react.dev/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/reactjs/react.dev/blob/main/LICENSE-DOCS.md) file.
Loading