You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/2020-10-20-react-v17.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ author: [gaearon,rachelnabors]
5
5
6
6
Today, we are releasing React 17! We've written at length about the role of the React 17 release and the changes it contains in [the React 17 RC blog post](/blog/2020/08/10/react-v17-rc.html). This post is a brief summary of it, so if you've already read the RC post, you can skip this one.
7
7
8
-
## No New Features
8
+
## No New Features {#no-new-features}
9
9
10
10
The React 17 release is unusual because it doesn't add any new developer-facing features. Instead, this release is primarily focused on **making it easier to upgrade React itself**.
11
11
12
12
In particular, React 17 is a “stepping stone” release that makes it safer to embed a tree managed by one version of React inside a tree managed by a different version of React.
13
13
14
14
It also makes it easier to embed React into apps built with other technologies.
15
15
16
-
## Gradual Upgrades
16
+
## Gradual Upgrades {#gradual-upgrades}
17
17
18
18
**React 17 enables gradual React upgrades.** When you upgrade from React 15 to 16 (or, this time, from React 16 to 17), you would usually upgrade your whole app at once. This works well for many apps. But it can get increasingly challenging if the codebase was written more than a few years ago and isn’t actively maintained. And while it’s possible to use two versions of React on the page, until React 17 this has been fragile and caused problems with events.
19
19
@@ -27,7 +27,7 @@ We've prepared an [example repository](https://github.com/reactjs/react-gradual-
27
27
>
28
28
>We've **postponed other changes** until after React 17. The goal of this release is to enable gradual upgrades. If upgrading to React 17 were too difficult, it would defeat its purpose.
29
29
30
-
## Changes to Event Delegation
30
+
## Changes to Event Delegation {#changes-to-event-delegation}
31
31
32
32
To enable gradual updates, we've needed to make some changes to the React event system. React 17 is a major release because these changes are potentially breaking. You can check out our [versioning FAQ](/docs/faq-versioning.html#breaking-changes) to learn more about our commitment to stability.
33
33
@@ -46,17 +46,17 @@ We've confirmed that [numerous](https://github.com/facebook/react/issues/7094) [
46
46
47
47
If you run into issues with this change, [here's a common way to resolve them](/blog/2020/08/10/react-v17-rc.html#fixing-potential-issues).
48
48
49
-
## Other Breaking Changes
49
+
## Other Breaking Changes {#other-breaking-changes}
50
50
51
51
[The React 17 RC blog post](/blog/2020/08/10/react-v17-rc.html#other-breaking-changes) describes the rest of the breaking changes in React 17.
52
52
53
53
We've only had to change fewer than twenty components out of 100,000+ in the Facebook product code to work with these changes, so **we expect that most apps can upgrade to React 17 without too much trouble**. Please [tell us](https://github.com/facebook/react/issues) if you run into problems.
54
54
55
-
## New JSX Transform
55
+
## New JSX Transform {#new-jsx-transform}
56
56
57
57
React 17 supports the [new JSX transform](/blog/2020/09/22/introducing-the-new-jsx-transform.html). We've also backported support for it to React 16.14.0, React 15.7.0, and 0.14.10. Note that it is completely opt-in, and you don't have to use it. The classic JSX transform will keep working, and there are no plans to stop supporting it.
58
58
59
-
## React Native
59
+
## React Native {#react-native}
60
60
61
61
React Native has a separate release schedule. We currently expect the support for React 17 to land in React Native 0.65, but the exact version is subject to change. As always, you can track the release discussions on the React Native Community releases [issue tracker](https://github.com/react-native-community/releases).
Copy file name to clipboardExpand all lines: content/docs/typechecking-with-proptypes.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ class Greeting extends React.Component {
196
196
197
197
`defaultProps`는 `this.props.name`의 값이 부모 컴포넌트에 의해 명시되지 않았을 때 값을 갖도록 할 것입니다. `propTypes`의 타입 확인은 `defaultProps`에도 적용되게 하기 위하여 `defaultProps`가 처리된 뒤에 일어날 것입니다.
198
198
199
-
### Function Components
199
+
### Function Components {#function-components}
200
200
201
201
함수 컴포넌트를 사용해서 개발한다면, PropTypes를 적절히 적용할 수 있도록 몇 가지 작은 변경사항을 만들어낼 수도 있습니다.
0 commit comments