Skip to content

Commit adfa67a

Browse files
authored
use "allowlist" in DOM Attributes in React 16 page (#3532)
1 parent 47e444a commit adfa67a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ React has always provided a JavaScript-centric API to the DOM. Since React compo
3232
<div tabIndex={-1} />
3333
```
3434

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:
35+
This has not changed. However, the way we enforced it in the past forced us to maintain a allowlist of all valid React DOM attributes in the bundle:
3636

3737
```js
3838
// ...
@@ -47,9 +47,9 @@ This had two downsides:
4747

4848
* You could not [pass a custom attribute](https://github.com/facebook/react/issues/140). This is useful for supplying browser-specific non-standard attributes, trying new DOM APIs, and integrating with opinionated third-party libraries.
4949

50-
* The attribute list kept growing over time, but most React canonical attribute names are already valid in the DOM. Removing most of the whitelist helped us reduce the bundle size a little bit.
50+
* The attribute list kept growing over time, but most React canonical attribute names are already valid in the DOM. Removing most of the allowlist helped us reduce the bundle size a little bit.
5151

52-
With the new approach, both of these problems are solved. With React 16, you can now pass custom attributes to all HTML and SVG elements, and React doesn't have to include the whole attribute whitelist in the production version.
52+
With the new approach, both of these problems are solved. With React 16, you can now pass custom attributes to all HTML and SVG elements, and React doesn't have to include the whole attribute allowlist in the production version.
5353

5454
**Note that you should still use the canonical React naming for known attributes:**
5555

0 commit comments

Comments
 (0)