(component)
| 5019 | } |
| 5020 | |
| 5021 | function isMounted(component) { |
| 5022 | { |
| 5023 | var owner = ReactCurrentOwner.current; |
| 5024 | if (owner !== null && owner.tag === ClassComponent) { |
| 5025 | var ownerFiber = owner; |
| 5026 | var instance = ownerFiber.stateNode; |
| 5027 | 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'); |
| 5028 | instance._warnedAboutRefsInRender = true; |
| 5029 | } |
| 5030 | } |
| 5031 | |
| 5032 | var fiber = get(component); |
| 5033 | if (!fiber) { |
| 5034 | return false; |
| 5035 | } |
| 5036 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 5037 | } |
| 5038 | |
| 5039 | function assertIsMounted(fiber) { |
| 5040 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected