(component)
| 4470 | } |
| 4471 | |
| 4472 | function isMounted(component) { |
| 4473 | { |
| 4474 | var owner = ReactCurrentOwner.current; |
| 4475 | if (owner !== null && owner.tag === ClassComponent) { |
| 4476 | var ownerFiber = owner; |
| 4477 | var instance = ownerFiber.stateNode; |
| 4478 | 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'); |
| 4479 | instance._warnedAboutRefsInRender = true; |
| 4480 | } |
| 4481 | } |
| 4482 | |
| 4483 | var fiber = get(component); |
| 4484 | if (!fiber) { |
| 4485 | return false; |
| 4486 | } |
| 4487 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 4488 | } |
| 4489 | |
| 4490 | function assertIsMounted(fiber) { |
| 4491 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected