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/2017-09-08-dom-attributes-in-react-16.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ In React 16, we are making a change. Now, any unknown attributes will end up in
29
29
React has always provided a JavaScript-centric API to the DOM. Since React components often take both custom and DOM-related props, it makes sense for React to use the `camelCase` convention just like the DOM APIs:
30
30
31
31
```js
32
-
<div tabIndex="-1"/>
32
+
<div tabIndex={-1}/>
33
33
```
34
34
35
35
This has not changed. However, the way we enforced it in the past forced us to maintain a whitelist of all valid React DOM attributes in the bundle:
@@ -55,10 +55,10 @@ With the new approach, both of these problems are solved. With React 16, you can
55
55
56
56
```js
57
57
// Yes, please
58
-
<div tabIndex="-1"/>
58
+
<div tabIndex={-1}/>
59
59
60
60
// Warning: Invalid DOM property `tabindex`. Did you mean `tabIndex`?
61
-
<div tabindex="-1"/>
61
+
<div tabindex={-1}/>
62
62
```
63
63
64
64
In other words, the way you use DOM components in React hasn't changed, but now you have some new capabilities.
@@ -120,7 +120,7 @@ Below is a detailed list of them.
120
120
***Known attributes with a different canonical React name:**
Copy file name to clipboardExpand all lines: content/blog/2020-10-20-react-v17.md
+6-6
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).
2020 has been a long year. As it comes to an end we wanted to share a special Holiday Update on our research into zero-bundle-size **React Server Components**.
7
+
8
+
To introduce React Server Components, we have prepared a talk and a demo. If you want, you can check them out during the holidays, or later when work picks back up in the new year.
**React Server Components are still in research and development.** We are sharing this work in the spirit of transparency and to get initial feedback from the React community. There will be plenty of time for that, so **don't feel like you have to catch up right now!**
15
+
16
+
If you want to check them out, we recommend to go in the following order:
17
+
18
+
1.**Watch the talk** to learn about React Server Components and see the demo.
19
+
20
+
2.**[Clone the demo](http://github.com/reactjs/server-components-demo)** to play with React Server Components on your computer.
21
+
22
+
3.**[Read the RFC (with FAQ at the end)](https://github.com/reactjs/rfcs/pull/188)** for a deeper technical breakdown and to provide feedback.
23
+
24
+
We are excited to hear from you on the RFC or in replies to the [@reactjs](https://twitter.com/reactjs) Twitter handle. Happy holidays, stay safe, and see you next year!
0 commit comments