(component)
| 4507 | } |
| 4508 | |
| 4509 | function isMounted(component) { |
| 4510 | { |
| 4511 | var owner = ReactCurrentOwner.current; |
| 4512 | if (owner !== null && owner.tag === ClassComponent) { |
| 4513 | var ownerFiber = owner; |
| 4514 | var instance = ownerFiber.stateNode; |
| 4515 | warning(instance._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber) || 'A component'); |
| 4516 | instance._warnedAboutRefsInRender = true; |
| 4517 | } |
| 4518 | } |
| 4519 | |
| 4520 | var fiber = get(component); |
| 4521 | if (!fiber) { |
| 4522 | return false; |
| 4523 | } |
| 4524 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 4525 | } |
| 4526 | |
| 4527 | function assertIsMounted(fiber) { |
| 4528 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected