Skip to content

Commit eb637ff

Browse files
authored
Merge branch 'master' into translate/hooks-faq
2 parents b6ef8fe + fd6791f commit eb637ff

22 files changed

+512
-348
lines changed

content/authors.yml

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ keyanzhang:
4949
kmeht:
5050
name: Kunal Mehta
5151
url: https://github.com/kmeht
52+
laurentan:
53+
name: Lauren Tan
54+
url: https://twitter.com/sugarpirate_
5255
LoukaN:
5356
name: Lou Husson
5457
url: https://twitter.com/loukan42

content/blog/2017-09-08-dom-attributes-in-react-16.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In React 16, we are making a change. Now, any unknown attributes will end up in
2929
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:
3030

3131
```js
32-
<div tabIndex="-1" />
32+
<div tabIndex={-1} />
3333
```
3434

3535
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
5555

5656
```js
5757
// Yes, please
58-
<div tabIndex="-1" />
58+
<div tabIndex={-1} />
5959

6060
// Warning: Invalid DOM property `tabindex`. Did you mean `tabIndex`?
61-
<div tabindex="-1" />
61+
<div tabindex={-1} />
6262
```
6363

6464
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.
120120
* **Known attributes with a different canonical React name:**
121121

122122
```js
123-
<div tabindex="-1" />
123+
<div tabindex={-1} />
124124
<div class="hi" />
125125
```
126126

content/blog/2020-09-22-introducing-the-new-jsx-transform.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ If you are using [eslint-plugin-react](https://github.com/yannickcr/eslint-plugi
192192

193193
### TypeScript {#typescript}
194194

195-
TypeScript supports the new JSX transform in [v4.1 beta](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#jsx-factories).
195+
TypeScript supports the new JSX transform in [v4.1](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#jsx-factories) and up.
196196

197197
### Flow {#flow}
198198

content/blog/2020-10-20-react-v17.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ author: [gaearon,rachelnabors]
55

66
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.
77

8-
## No New Features
8+
## No New Features {#no-new-features}
99

1010
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**.
1111

1212
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.
1313

1414
It also makes it easier to embed React into apps built with other technologies.
1515

16-
## Gradual Upgrades
16+
## Gradual Upgrades {#gradual-upgrades}
1717

1818
**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.
1919

@@ -27,7 +27,7 @@ We've prepared an [example repository](https://github.com/reactjs/react-gradual-
2727
>
2828
>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.
2929
30-
## Changes to Event Delegation
30+
## Changes to Event Delegation {#changes-to-event-delegation}
3131

3232
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.
3333

@@ -46,17 +46,17 @@ We've confirmed that [numerous](https://github.com/facebook/react/issues/7094) [
4646

4747
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).
4848

49-
## Other Breaking Changes
49+
## Other Breaking Changes {#other-breaking-changes}
5050

5151
[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.
5252

5353
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.
5454

55-
## New JSX Transform
55+
## New JSX Transform {#new-jsx-transform}
5656

5757
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.
5858

59-
## React Native
59+
## React Native {#react-native}
6060

6161
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).
6262

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "Introducing Zero-Bundle-Size React Server Components"
3+
author: [gaearon,laurentan,josephsavona,sebmarkbage]
4+
---
5+
6+
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.
9+
10+
<br>
11+
12+
<iframe width="560" height="315" src="https://www.youtube.com/embed/TQQPAU21ZUw" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
13+
14+
**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

Comments
 (0)