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: .github/PULL_REQUEST_TEMPLATE.md
-11Lines changed: 0 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,3 @@
1
-
Note to Hacktoberfest 🎃 participants:
2
-
3
-
While we appreciate the enthusiasm, we are experiencing a high volume of drive-by pull requests (one-line changes, README tweaks, etc.). Please remember that hundreds of people are subscribed to this repo and will receive notifications for these PRs. Spam submissions will be closed and won't count towards your Hacktoberfest goals.
4
-
5
-
Please search for issues tagged [`good first issue`][gfi] or [`hacktoberfest`][hacktoberfest] to find things to work on.
Copy file name to clipboardExpand all lines: content/blog/2017-09-08-dom-attributes-in-react-16.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
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-09-22-introducing-the-new-jsx-transform.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ Since the new JSX transform doesn't require React to be in scope, [we've also pr
99
99
100
100
### Create React App {#create-react-app}
101
101
102
-
Create React App support [has been added](https://github.com/facebook/create-react-app/pull/9645) and will be available in the [upcoming v4.0 release](https://gist.github.com/iansu/4fab7a9bfa5fa6ebc87a908c62f5340b) which is currently in beta testing.
102
+
Create React App [4.0.0](https://github.com/facebook/create-react-app/releases/tag/v4.0.0)+ uses the new transform for compatible React versions.
Currently, the old transform (`"runtime": "classic"`) is the default option. To enable the new transform, you can pass `{"runtime": "automatic"}` as an option to `@babel/plugin-transform-react-jsx` or `@babel/preset-react`:
146
+
Currently, the old transform `{"runtime": "classic"}` is the default option. To enable the new transform, you can pass `{"runtime": "automatic"}` as an option to `@babel/plugin-transform-react-jsx` or `@babel/preset-react`:
147
147
148
148
```js
149
149
// If you are using @babel/preset-react
@@ -192,11 +192,11 @@ If you are using [eslint-plugin-react](https://github.com/yannickcr/eslint-plugi
192
192
193
193
### TypeScript {#typescript}
194
194
195
-
TypeScript supports the 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.
196
196
197
197
### Flow {#flow}
198
198
199
-
Flow supports the new JSX transform in [v0.126.0](https://github.com/facebook/flow/releases/tag/v0.126.0) and up.
199
+
Flow supports the new JSX transform in [v0.126.0](https://github.com/facebook/flow/releases/tag/v0.126.0) and up, by adding `react.runtime=automatic` to your Flow configuration options.
>Keep in mind that the codemod output will not always match your project's coding style, so you might want to run [Prettier](https://prettier.io/) after the codemod finishes for consistent formatting.
215
215
216
-
217
216
Running this codemod will:
218
217
219
218
* Remove all unused React imports as a result of upgrading to the new JSX transform.
0 commit comments