GeezerVison is showing github.com — Remove textarea special case from child fiber (#21222) · react/react-native@8a4a59c
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-reconciler/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.new.js +10-12Lines changed: 10 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -216,18 +216,16 @@ function coerceRef( |
216 | 216 | } |
217 | 217 |
|
218 | 218 | function throwOnInvalidObjectType(returnFiber: Fiber, newChild: Object) { |
219 | | - if (returnFiber.type !== 'textarea') { |
220 | | - const childString = Object.prototype.toString.call(newChild); |
221 | | - invariant( |
222 | | - false, |
223 | | - 'Objects are not valid as a React child (found: %s). ' + |
224 | | - 'If you meant to render a collection of children, use an array ' + |
225 | | - 'instead.', |
226 | | - childString === '[object Object]' |
227 | | - ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' |
228 | | - : childString, |
229 | | - ); |
230 | | - } |
| 219 | + const childString = Object.prototype.toString.call(newChild); |
| 220 | + invariant( |
| 221 | + false, |
| 222 | + 'Objects are not valid as a React child (found: %s). ' + |
| 223 | + 'If you meant to render a collection of children, use an array ' + |
| 224 | + 'instead.', |
| 225 | + childString === '[object Object]' |
| 226 | + ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' |
| 227 | + : childString, |
| 228 | + ); |
231 | 229 | } |
232 | 230 |
|
233 | 231 | function warnOnFunctionType(returnFiber: Fiber) { |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.old.js +10-12Lines changed: 10 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -216,18 +216,16 @@ function coerceRef( |
216 | 216 | } |
217 | 217 |
|
218 | 218 | function throwOnInvalidObjectType(returnFiber: Fiber, newChild: Object) { |
219 | | - if (returnFiber.type !== 'textarea') { |
220 | | - const childString = Object.prototype.toString.call(newChild); |
221 | | - invariant( |
222 | | - false, |
223 | | - 'Objects are not valid as a React child (found: %s). ' + |
224 | | - 'If you meant to render a collection of children, use an array ' + |
225 | | - 'instead.', |
226 | | - childString === '[object Object]' |
227 | | - ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' |
228 | | - : childString, |
229 | | - ); |
230 | | - } |
| 219 | + const childString = Object.prototype.toString.call(newChild); |
| 220 | + invariant( |
| 221 | + false, |
| 222 | + 'Objects are not valid as a React child (found: %s). ' + |
| 223 | + 'If you meant to render a collection of children, use an array ' + |
| 224 | + 'instead.', |
| 225 | + childString === '[object Object]' |
| 226 | + ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' |
| 227 | + : childString, |
| 228 | + ); |
231 | 229 | } |
232 | 230 |
|
233 | 231 | function warnOnFunctionType(returnFiber: Fiber) { |
|