Skip to content
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

[docs/korean] Translate official document to Korean #18

Merged
merged 83 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
c3e5e3a
Create installation_kr.md and translated installation_kr to Korean
alstn2468 May 15, 2020
5b00cc6
Seperate korean translation folder (docs/docs_kr)
alstn2468 May 15, 2020
287b70c
Translate introduction/gettsing-started.mdx to Korean
alstn2468 May 15, 2020
409a8bc
Fix miss typo at docs/krgetting-started.mdx
alstn2468 May 15, 2020
0f4a34a
Fix missing [] at getting-started.mdx -> CRA
alstn2468 May 15, 2020
747578c
Translate docs_kr/basic_tutorial/intro.md to Korean
alstn2468 May 15, 2020
c2a1768
Translate docs_kr/basic_tutorial/atoms.mdx
alstn2468 May 15, 2020
e9b9108
Remove english line at atoms.mdx
alstn2468 May 15, 2020
2bc7076
Remove english line at atoms.mdx
alstn2468 May 15, 2020
7baf77e
Fix miss typo at atoms.mdx
alstn2468 May 15, 2020
a1a3793
Fix miss typo at installation.d & gettig-started.mdx
alstn2468 May 16, 2020
3ee2c60
Translate docs_kr/basic_tutorial/selectors.md
alstn2468 May 16, 2020
b0b8875
Fix miss typo at basic-tutorial/performance.md line 60
alstn2468 May 17, 2020
b6ff106
Translate performace.md to Korean
alstn2468 May 17, 2020
e9043d0
Translate core-concepts to Korean
alstn2468 May 17, 2020
d68f5e6
Fix core-concepts
alstn2468 May 17, 2020
4f3ef50
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 May 19, 2020
732c44b
Apply lately document from docs to docs_kr
alstn2468 May 19, 2020
646fde6
Fix miss typo at docs_kr - performance section
alstn2468 May 25, 2020
3b58fc6
[docs/kr] Translate introduction/motivation.md
alstn2468 Jun 4, 2020
ff04586
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Jun 15, 2020
c0650ca
Add installation ESLint docs korean verstion
alstn2468 Jun 15, 2020
aca8fb7
Translate installation code block comment to Korean
alstn2468 Jun 15, 2020
c1b3dbd
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Jul 17, 2020
c24921f
Apply recent changes at selectors.md
alstn2468 Jul 17, 2020
0ccd52f
Apply recent changes at installation.md
alstn2468 Jul 17, 2020
c6e24fb
Translate api-reference/core/RecoilRoot.md
alstn2468 Jul 17, 2020
362198e
Translate sub title at RecoilRoot
alstn2468 Jul 17, 2020
9c91af0
Translate api-reference/core/atom
alstn2468 Jul 17, 2020
1775d95
Translate api-reference/core/selector
alstn2468 Jul 27, 2020
7ff97d6
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Aug 18, 2020
879a691
Translate api-reference/core/isRecoilValue
alstn2468 Aug 18, 2020
b3dc9fd
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Sep 11, 2020
a925dc8
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Oct 20, 2020
6d9fbc2
Sync upstream docs to docs_kr
alstn2468 Oct 20, 2020
fef1a35
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Nov 3, 2020
5951804
Sync installation.md
alstn2468 Nov 3, 2020
328c43d
Sync atomFamily.md
alstn2468 Nov 3, 2020
a4b3b87
Sync atom, guides and translate additional atom.md
alstn2468 Nov 3, 2020
4e07591
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Nov 13, 2020
2908ba8
Sync asynchronous-data-queries, testing, core-concepts
alstn2468 Nov 13, 2020
b39e246
Fix typo in intro & performance
cos18 Nov 30, 2020
6c20fc7
Merge remote-tracking branch 'upstream/docs' into docs
alstn2468 Apr 5, 2021
36fa13c
Init docusaurus i18n config
alstn2468 Apr 5, 2021
24e9649
Fix locale kr -> ko
alstn2468 Apr 5, 2021
da727f0
Translated: Snapshot.md is now translated into Korean
Mark-Yoo Apr 5, 2021
e2abe8a
Translated: useGotoRecoilSnapshot.md is now translated into Korean
Mark-Yoo Apr 5, 2021
109c465
Translated: Lodable.md is now translated into Korean
Mark-Yoo Apr 5, 2021
22954c3
Translated: useRecoilCallback.md is now translated into Korean
Mark-Yoo Apr 5, 2021
2c6a503
Translated: useRecoilSnapshot.md is now translated into Korean
Mark-Yoo Apr 5, 2021
88cf0f9
Translated: useRecoilState.md is now translated into Korean
Mark-Yoo Apr 5, 2021
f2e1397
Translated: useRecoilStateLoadable.md is now translated into Korean
Mark-Yoo Apr 5, 2021
e0cbf2f
Translated: useRecoilTransactionObserver.md is now translated into Ko…
Mark-Yoo Apr 5, 2021
7d2eb8f
Translated: useRecoilValue.md is now translated into Korean
Mark-Yoo Apr 5, 2021
776cdbf
Translated: useRecoilValueLoadable.md is now translated into Korean
Mark-Yoo Apr 5, 2021
2a27f52
Translated: useResetRecoilState.md is now translated into Korean
Mark-Yoo Apr 5, 2021
a239d37
Translated: useSetRecoilState.md is now translated into Korean
Mark-Yoo Apr 5, 2021
25ecd63
Translated: asynchronous-data-queries.md is now translated into Korean
Mark-Yoo Apr 5, 2021
f65ccee
Translated: atom-effects.md is now translated into Korean
Mark-Yoo Apr 5, 2021
24e6a9e
Translated: dev-tools.md is now translated into Korean
Mark-Yoo Apr 5, 2021
c67a3cd
Translated: testing.md is now translated into Korean
Mark-Yoo Apr 5, 2021
f399004
Sync docs
alstn2468 Apr 5, 2021
3a56dc1
Add useGetRecoilValueInfo.md to ko/api-reference/core
alstn2468 Apr 5, 2021
545d796
Translated: noWait.md is now translated into korean
Apr 6, 2021
4693916
Translated: waitForAny.md is now translated into korean
Apr 6, 2021
c7c7e0c
Translated: waitForAll.md is now translated into korean
Apr 6, 2021
35d996a
Translated: waitForNone.md is now translated into korean
Apr 6, 2021
7980d66
Translated: errorSelector.md is now translated into korean
Apr 6, 2021
3f2ae16
Translated: constSelector.md is now translated into korean
Apr 6, 2021
df49239
Translated: selectorFamily.md is now translated into korean
Apr 6, 2021
fe51533
Translated: useRecoilBridgeAcrossReactRoots.md is now translated into…
Apr 6, 2021
6871580
Translated: atomFamily.md is now translated into korean
Apr 6, 2021
dfd72ab
Merge pull request #1 from alstn2468/ko-translate
alstn2468 Apr 9, 2021
0a4d4b7
Add code.json korean translation
alstn2468 Apr 9, 2021
7b0b920
Add footer.json korean translation
alstn2468 Apr 14, 2021
66c4a73
Add navbar korean translation, fix core concepts title
alstn2468 Apr 14, 2021
f36d342
Add remaining Korean translation data
alstn2468 Apr 14, 2021
05f42e2
Update docs/i18n/ko/code.json
alstn2468 Apr 14, 2021
2a4765b
Fix typo (시그니쳐 -> 시그니처)
alstn2468 Apr 14, 2021
4e13657
Init index, resources page translation follow #377(ee54104)
alstn2468 Apr 15, 2021
ace9980
Merge branch 'docs' of https://github.com/alstn2468/Recoil into docs
alstn2468 Apr 15, 2021
2446615
index.js, resources 페이지 관련 번역 추가
alstn2468 Apr 15, 2021
4c68aa4
Merge branch 'docs' into docs
alstn2468 Apr 19, 2021
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 docs/docs/basic-tutorial/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ That helps with the re-renders of `<TodoItemCreator />` and `<TodoListFilters />

Thinking of a todo list as an array of objects is problematic because it forms a tight coupling between each individual todo item and the list of all todo items.

To fix this issue, we need to rethink our state shape by thinking about **normalized state**. In the context of our todo-list app, this means storing the **list** of item ids separately from the **data** for each invididual item.
To fix this issue, we need to rethink our state shape by thinking about **normalized state**. In the context of our todo-list app, this means storing the **list** of item ids separately from the **data** for each individual item.
alstn2468 marked this conversation as resolved.
Show resolved Hide resolved
alstn2468 marked this conversation as resolved.
Show resolved Hide resolved

> For a more detailed discussion on how to think about normalized state, see [this page from the Redux documentation](https://redux.js.org/recipes/structuring-reducers/normalizing-state-shape).

Expand Down
30 changes: 30 additions & 0 deletions docs/docs_kr/api-reference/core/RecoilRoot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: <RecoilRoot ...props />
sidebar_label: <RecoilRoot />
---

Provides the context in which atoms have values. Must be an ancestor of any component that uses any Recoil hooks. Multiple roots may co-exist; atoms will have distinct values within each root. If they are nested, the innermost root will completely mask any outer roots.

---

- `props`
- `initializeState?`: `({set, setUnvalidatedAtomValues}) => void`.
- A function that will be called when RecoilStore is first rendered which can set initial values for atoms. It is provided with two arguments:
- `set`: `<T>(RecoilValue<T>, T) => void`
- Sets the initial value of a single atom to the provided value.
- `setUnvalidatedAtomValues`: `(Map<string, mixed>) => void`
- Sets the initial value for any number of atoms whose keys are the keys in the provided map. As with `useSetUnvalidatedAtomValues`, the validator for each atom will be called when it is next read, and setting an atom without a configured validator will result in an exception.

### Example

```javascript
import {RecoilRoot} from 'recoil';

function AppRoot() {
return (
<RecoilRoot>
<ComponentThatUsesRecoil />
</RecoilRoot>
);
}
```
44 changes: 44 additions & 0 deletions docs/docs_kr/api-reference/core/atom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: atom(options)
sidebar_label: atom()
---

Returns writeable Recoil state.

---

- `options`
- `key`: A unique string used to identify the atom internally. This string should be unique with respect to other atoms and selectors in the entire application.
- `default`: The initial value of the atom.

Most often, you'll use the following hooks to read the value of atoms:

- [`useRecoilState()`](/docs/api-reference/core/useRecoilState): use this hook when you intend on both reading and writing to the atom.
- [`useRecoilValue()`](/docs/api-reference/core/useRecoilValue): use this hook when you intend on only reading the atom.
- [`useSetRecoilState()`](/docs/api-reference/core/useRecoilState): use this hook when you intend on only writing to the atom.

Note all of the hooks above result in the component **subscribing** to the atom, so the component will re-render on any subsequent updates to the atom. For rare cases where you need to read an atom's value without subscribing the component, see [`useRecoilCallback()`](/docs/api-reference/core/useRecoilCallback).

### Example

```javascript
import {atom, useRecoilState} from 'recoil';

const counter = atom({
key: 'myCounter',
default: 0,
});

function Counter() {
const [count, setCount] = useRecoilState(counter);
const incrementByOne = () => setCount(count + 1);

return (
<div>
Count: {count}
<br />
<button onClick={incrementByOne}>Increment</button>
</div>
);
}
```
30 changes: 30 additions & 0 deletions docs/docs_kr/api-reference/core/isRecoilValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: isRecoilValue(value)
sidebar_label: isRecoilValue()
---

Returns `true` if `value` is either an atom or selector and `false` otherwise.

---

### Example

```javascript
import {atom, isRecoilValue} from 'recoil';

const counter = atom({
key: 'myCounter',
default: 0,
});

const strCounter = selector({
key: 'myCounterStr',
get: ({get}) => String(get(counter)),
});

isRecoilValue(counter); // true
isRecoilValue(strCounter); // true

isRecoilValue(5); // false
isRecoilValue({}); // false
```
57 changes: 57 additions & 0 deletions docs/docs_kr/api-reference/core/selector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: selector(options)
sidebar_label: selector()
---

Returns writeable or read-only Recoil state, depending on the options passed to the function.

Selectors represent **derived state**. You can think of derived state as the output of passing state to a pure function that modifies the given state in some way.

---

- `options`
- `key`: A unique string used to identify the atom internally. This string should be unique with respect to other atoms and selectors in the entire application.
- `get`: A function that is passed an object as the first parameter containing the following properties:
- `get`: a function used to retrieve values from other atoms/selectors. All atoms/selectors passed to this function will be implicitly added to a list of **dependencies** for the selector. If any of the selector's dependencies change, the selector will re-evaluate.
- `set?`: If this property is set, the selector will return **writeable** state. A function that is passed an object as the first parameter containing the following properties:
- `get`: a function used to retrieve values from other atoms/selectors. This function will not subscribe the selector to the given atoms/selectors.
- `set`: a function used to set the values of Recoil state. The first parameter is the Recoil state and the second parameter is the new value.

### Example (Synchronous)

```javascript
import {atom, selector, useRecoilState} from 'recoil';

const tempFahrenheit = atom({
key: 'tempFahrenheit',
default: 32,
});

const tempCelcius = selector({
key: 'tempCelcius',
get: ({get}) => ((get(tempFahrenheit) - 32) * 5) / 9,
set: ({set}, newValue) => set(tempFahrenheit, (newValue * 9) / 5 + 32),
});

function TempCelcius() {
const [tempF, setTempF] = useRecoilState(tempFahrenheit);
const [tempC, setTempC] = useRecoilState(tempCelcius);

const addTenCelcius = () => setTempC(tempC + 10);
const addTenFahrenheit = () => setTempF(tempF + 10);

return (
<div>
Temp (Celcius): {tempC}
<br />
Temp (Fahrenheit): {tempF}
<br />
<button onClick={addTenCelcius}>Add 10 Celcius</button>
<br />
<button onClick={addTenFahrenheit}>Add 10 Fahrenheit</button>
</div>
);
}
```

### Example (Asynchronous)
28 changes: 28 additions & 0 deletions docs/docs_kr/api-reference/core/useRecoilCallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: useRecoilCallback()
---

### Example

```javascript
import {atom, useRecoilCallback} from 'recoil';

const itemsInCart = atom({
key: 'itemsInCart',
default: 0,
});

function CartInfoDebug() {
const logCartItems = useRecoilCallback(async ({getPromise}) => {
const numItemsInCart = await getPromise(itemsInCart);

console.log('Items in cart: ', numItemsInCart);
});

return (
<div>
<button onClick={logCartItems}>Log Cart Items</button>
</div>
);
}
```
51 changes: 51 additions & 0 deletions docs/docs_kr/api-reference/core/useRecoilState.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: useRecoilState(state)
sidebar_label: useRecoilState()
---

Returns a tuple where the first element is the value of state and the second element is a setter function that will update the value of the given state when called.

This hook will implicitly subscribe the component to the given state.

---

- `state`: an [`atom`](/docs/api-reference/core/atom) or a _writeable_ [`selector`](/docs/api-reference/core/selector). Writeable selectors are selectors that were have both a `get` and `set` in their definition while read-only selectors only have a `get`.

This is the recommended hook to use when a component intends to read and write state.

### Example

```javascript
import {atom, selector, useRecoilState} from 'recoil';

const tempFahrenheit = atom({
key: 'tempFahrenheit',
default: 32,
});

const tempCelcius = selector({
key: 'tempCelcius',
get: ({get}) => ((get(temptempFahrenheit) - 32) * 5) / 9,
set: ({set}, newValue) => set(tempFahrenheit, (newValue * 9) / 5 + 32),
});

function TempCelcius() {
const [tempF, setTempF] = useRecoilState(tempFahrenheit);
const [tempC, setTempC] = useRecoilState(tempCelcius);

const addTenCelcius = () => setTempC(tempC + 10);
const addTenFahrenheit = () => setTempF(tempF + 10);

return (
<div>
Temp (Celcius): {tempC}
<br />
Temp (Fahrenheit): {tempF}
<br />
<button onClick={addTenCelcius}>Add 10 Celcius</button>
<br />
<button onClick={addTenFahrenheit}>Add 10 Fahrenheit</button>
</div>
);
}
```
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/core/useRecoilStateLoadable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: useRecoilStateLoadable()
---
43 changes: 43 additions & 0 deletions docs/docs_kr/api-reference/core/useRecoilValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: useRecoilValue(state)
sidebar_label: useRecoilValue()
---

Returns the value of the given Recoil state.

This hook will implicitly subscribe the component to the given state.

---

- `state`: an [`atom`](/docs/api-reference/core/atom) or [`selector`](/docs/api-reference/core/selector)

This is the recommended hook to use when a component intends to read state without writing to it as this hook works with both **read-only state** and **writeable state**. Atoms are writeable state while selectors may be either read-only or writeable. See [`selector()`](/docs/api-reference/core/selector) for more info.

### Example

```javascript
import {atom, selector, useRecoilValue} from 'recoil';

const namesState = atom({
key: 'namesState',
default: ['', 'Ella', 'Chris', '', 'Paul'],
});

const filteredNamesState = selector({
key: 'filteredNamesState',
get: ({get}) => get(namesState).filter((str) => str !== ''),
});

function NameDisplay() {
const names = useRecoilValue(namesState);
const filteredNames = useRecoilValue(filteredNamesState);

return (
<>
Original names: {names.join(',')}
<br />
Filtered names: {filteredNames.join(',')}
</>
);
}
```
23 changes: 23 additions & 0 deletions docs/docs_kr/api-reference/core/useRecoilValueLoadable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: useRecoilValueLoadable(state)
sidebar_label: useRecoilValueLoadable()
---

Returns a `Loadable`.

This hook is intended to be used for reading the value of asynchronous selectors. This hook will implicitly subscribe the component to the given state.

Unlike `useRecoilValue()`, this hook will not throw a `Promise` when reading from a pending asynchronous selector (for the purpose of working alongside Suspense). Instead, this hook returns a `Loadable`, which is an object with the following interface:

- `state`: indicates the status of the selector. Possible values are `'hasValue'`, `'hasError'`, `'loading'`.
- `getValue()`: if there is an error, this function throws the error. If selector is still loading, it throws a Promise. Otherwise it returns the value that the selector resolved to.
- `toPromise()`: returns a `Promise` that will resolve when the selector has resolved. If the selector is synchronous or has already resolved, it returns a `Promise` that resolves immediately.

---

- `state`: a [`selector`](/docs/api-reference/core/selector) that _may_ have some asynchronous operations. The status of the returned loadable will depend on the status of the given selector.

### Example

```jsx
```
11 changes: 11 additions & 0 deletions docs/docs_kr/api-reference/core/useResetRecoilState.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: useResetRecoilState(state)
---

Returns a function that will reset the value of the given state to its default value.

---

- `state`: a writeable Recoil state

### Example
12 changes: 12 additions & 0 deletions docs/docs_kr/api-reference/core/useSetRecoilState.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: useSetRecoilState(state)
sidebar_label: useSetRecoilState()
---

Returns a setter function for updating the value of writeable Recoil state.

---

- `state`: writeable Recoil state.

### Example
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/atomFamily.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: atomFamily()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/constSelector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: constSelector()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/errorSelector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: errorSelector()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/noWait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: noWait()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/selectorFamily.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: selectorFamily()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/waitForAll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: waitForAll()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/waitForAny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: waitForAny()
---
3 changes: 3 additions & 0 deletions docs/docs_kr/api-reference/utils/waitForNone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: waitForNone()
---
Loading