(workInProgress: Fiber, element: ReactElement)
| 285 | } |
| 286 | |
| 287 | function coerceRef(workInProgress: Fiber, element: ReactElement): void { |
| 288 | // TODO: This is a temporary, intermediate step. Now that enableRefAsProp is on, |
| 289 | // we should resolve the `ref` prop during the begin phase of the component |
| 290 | // it's attached to (HostComponent, ClassComponent, etc). |
| 291 | const refProp = element.props.ref; |
| 292 | // TODO: With enableRefAsProp now rolled out, we shouldn't use the `ref` field. We |
| 293 | // should always read the ref from the prop. |
| 294 | workInProgress.ref = refProp !== undefined ? refProp : null; |
| 295 | } |
| 296 | |
| 297 | function throwOnInvalidObjectTypeImpl(returnFiber: Fiber, newChild: Object) { |
| 298 | if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) { |
no outgoing calls
no test coverage detected