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

Translate 06, 07 #10

Merged
merged 5 commits into from
May 4, 2019
Merged
Changes from 3 commits
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,10 @@
}
```

6. ### When to use a Class Component over a Function Component?

If the component needs *state or lifecycle methods* then use class component otherwise use function component.
6. ### 언제 Function Component 대신에 Class Component를 사용하나?

만약, 컴포넌트가 `state나 lifecycle 메서드`가 필요하다면 class 컴포넌트를 사용하고 아니라면 function 컴포넌트를 사용한다.
SeonHyungJo marked this conversation as resolved.
Show resolved Hide resolved

7. ### What are Pure Components?

*`React.PureComponent`* is exactly the same as *`React.Component`* except that it handles the `shouldComponentUpdate()` method for you. When props or state changes, *PureComponent* will do a shallow comparison on both props and state. *Component* on the other hand won't compare current props and state to next out of the box. Thus, the component will re-render by default whenever `shouldComponentUpdate` is called.
Expand Down