Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Update reference-test-renderer.md
  • Loading branch information
toy9910 authored Nov 21, 2019
commit 9f88ecdc962015afad26e312b5dd129506d205c4
6 changes: 3 additions & 3 deletions content/docs/reference-test-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ TestRenderer.create(element, options);
TestRenderer.act(callback);
```

[`react-dom/test-utils` `act()`](/docs/test-utils.html#act)와 비슷하게, `TestRenderer.act`는 실행을 위한 컴포넌트들을 준비합니다. `TestRenderer.create` 와 `trestRenderer.update`를 호출을 보호하기 위해 이 버전의 `act()`를 사용하십시오.
[`react-dom/test-utils` `act()`](/docs/test-utils.html#act)와 비슷하게, `TestRenderer.act`는 검증을 위한 컴포넌트들을 준비합니다. `TestRenderer.create` 와 `trestRenderer.update`를 호출을 이 버전의 `act()`를 사용해서 감싸주세요.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestRenderer.create 사이에 불필요한 공백이있습니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자연스러운 문장을 위해 아래처럼 수정을 제안합니다.

TestRenderer.createtrestRenderer.update를 호출을 이 버전의 act()를 사용해서 감싸주세요.

TestRenderer.createtrestRenderer.update의 호출을 이 버전의 act()를 사용해서 감싸주세요.


```javascript
import {create, act} from 'react-test-renderer';
import App from './app.js'; // The component being tested

// 컴포넌트를 랜더링합니다.
// 컴포넌트를 렌더링합니다.
let root;
act(() => {
root = create(<App value={1}/>)
Expand All @@ -128,7 +128,7 @@ act(() => {
// root를 검증합니다.
expect(root.toJSON()).toMatchSnapshot();

// 몇몇의 다른 프로퍼티즈들을 업데이트합니다.
// 몇몇의 다른 props를 업데이트합니다.
act(() => {
root = root.update(<App value={2}/>);
})
Expand Down