Skip to content

Commit 90f06da

Browse files
sukjaetaehwanno
authored andcommitted
Translated docs/faq-ajax into Korean (#80)
* Translated docs/faq-ajax into Korean * Made a correction to reflect request. https://github.com/reactjs/ko.reactjs.org/pull/80\#discussion_r269469209 * Update faq-ajax.md
1 parent 3f26799 commit 90f06da

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

โ€Žcontent/docs/faq-ajax.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
id: faq-ajax
3-
title: AJAX and APIs
3+
title: AJAX ์™€ APIs
44
permalink: docs/faq-ajax.html
55
layout: docs
66
category: FAQ
77
---
88

9-
### How can I make an AJAX call? {#how-can-i-make-an-ajax-call}
9+
### ์–ด๋–ป๊ฒŒ AJAX ํ˜ธ์ถœ์„ ํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”? {#how-can-i-make-an-ajax-call}
1010

11-
You can use any AJAX library you like with React. Some popular ones are [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), and the browser built-in [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
11+
๋‹น์‹ ์ด ์„ ํ˜ธํ•˜๋Š” AJAX ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ React์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์œ ๋ช…ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ๋Š” [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), ๊ทธ๋ฆฌ๊ณ  ๋ธŒ๋ผ์šฐ์ €์— ๋‚ด์žฅ๋œ [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) ๋“ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค.
1212

13-
### Where in the component lifecycle should I make an AJAX call? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
13+
### ์ปดํฌ๋„ŒํŠธ์˜ ์ƒ๋ช…์ฃผ๊ธฐ ์ค‘ ์–ด๋””์—์„œ AJAX ํ˜ธ์ถœ์„ ํ•  ์ˆ˜ ์žˆ๋‚˜์š”? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
1414

15-
You should populate data with AJAX calls in the [`componentDidMount`](/docs/react-component.html#mounting) lifecycle method. This is so you can use `setState` to update your component when the data is retrieved.
15+
AJAX ํ˜ธ์ถœ์„ ํ†ตํ•œ ๋ฐ์ดํ„ฐ๋Š” ์ƒ๋ช…์ฃผ๊ธฐ ๋ฉ”์„œ๋“œ ์ค‘ [`componentDidMount`](/docs/react-component.html#mounting) ์•ˆ์— ์ถ”๊ฐ€๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„ ์˜ฌ ๋•Œ `setState`๋ฅผ ํ†ตํ•˜์—ฌ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๊ธฐ ์œ„ํ•จ์ž…๋‹ˆ๋‹ค.
1616

17-
### Example: Using AJAX results to set local state {#example-using-ajax-results-to-set-local-state}
17+
### ์˜ˆ์‹œ: ๋กœ์ปฌ state๋ฅผ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•ด AJAX ๊ฒฐ๊ณผ ์‚ฌ์šฉํ•˜๊ธฐ {#example-using-ajax-results-to-set-local-state}
1818

19-
The component below demonstrates how to make an AJAX call in `componentDidMount` to populate local component state.
19+
์•„๋ž˜ ์ปดํฌ๋„ŒํŠธ๋Š” ๋กœ์ปฌ ์ปดํฌ๋„ŒํŠธ์˜ state๋ฅผ ์ฑ„์šฐ๊ธฐ ์œ„ํ•˜์—ฌ `componentDidMount` ์•ˆ์—์„œ ์–ด๋–ป๊ฒŒ AJAX ํ˜ธ์ถœ์„ ๋งŒ๋“œ๋Š”์ง€ ๋ณด์—ฌ ์ค๋‹ˆ๋‹ค.
2020

21-
The example API returns a JSON object like this:
21+
API ์˜ˆ์‹œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ JSON ๊ฐ์ฒด๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
2222

2323
```
2424
{
@@ -50,9 +50,9 @@ class MyComponent extends React.Component {
5050
items: result.items
5151
});
5252
},
53-
// Note: it's important to handle errors here
54-
// instead of a catch() block so that we don't swallow
55-
// exceptions from actual bugs in components.
53+
// ์ฃผ์˜: ์ปดํฌ๋„ŒํŠธ์˜ ์‹ค์ œ ๋ฒ„๊ทธ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์˜ˆ์™ธ์‚ฌํ•ญ๋“ค์„ ๋„˜๊ธฐ์ง€ ์•Š๋„๋ก
54+
// ์—๋Ÿฌ๋ฅผ catch() ๋ธ”๋ก(block)์—์„œ ์ฒ˜๋ฆฌํ•˜๊ธฐ๋ณด๋‹ค๋Š”
55+
// ์ด ๋ถ€๋ถ„์—์„œ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.
5656
(error) => {
5757
this.setState({
5858
isLoaded: true,

0 commit comments

Comments
ย (0)