Skip to content

Commit 6e6676d

Browse files
committed
Clean up RESERVED field
These are now covered by switches inside each case.
1 parent 05e90f4 commit 6e6676d

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

packages/react-dom-bindings/src/shared/DOMProperty.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@
77
* @flow
88
*/
99

10-
import {enableCustomElementPropertySupport} from 'shared/ReactFeatureFlags';
1110
import hasOwnProperty from 'shared/hasOwnProperty';
1211

1312
type PropertyType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
1413

15-
// A reserved attribute.
16-
// It is handled by React separately and shouldn't be written to the DOM.
17-
export const RESERVED = 0;
18-
1914
// A simple string attribute.
2015
// Attributes that aren't in the filter are presumed to have this type.
2116
export const STRING = 1;
@@ -120,37 +115,6 @@ function PropertyInfoRecord(
120115
// name warnings.
121116
const properties: {[string]: $FlowFixMe} = {};
122117

123-
// These props are reserved by React. They shouldn't be written to the DOM.
124-
const reservedProps = [
125-
'children',
126-
'dangerouslySetInnerHTML',
127-
// TODO: This prevents the assignment of defaultValue to regular
128-
// elements (not just inputs). Now that ReactDOMInput assigns to the
129-
// defaultValue property -- do we need this?
130-
'defaultValue',
131-
'defaultChecked',
132-
'innerHTML',
133-
'suppressContentEditableWarning',
134-
'suppressHydrationWarning',
135-
'style',
136-
];
137-
if (enableCustomElementPropertySupport) {
138-
reservedProps.push('innerText', 'textContent');
139-
}
140-
141-
reservedProps.forEach(name => {
142-
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
143-
properties[name] = new PropertyInfoRecord(
144-
name,
145-
RESERVED,
146-
false, // mustUseProperty
147-
name, // attributeName
148-
null, // attributeNamespace
149-
false, // sanitizeURL
150-
false, // removeEmptyString
151-
);
152-
});
153-
154118
// A few React string attributes have a different name.
155119
// This is a mapping from React prop names to the attribute names.
156120
[

0 commit comments

Comments
 (0)