(component)
| 5181 | } |
| 5182 | |
| 5183 | function isMounted(component) { |
| 5184 | { |
| 5185 | var owner = ReactCurrentOwner.current; |
| 5186 | if (owner !== null && owner.tag === ClassComponent) { |
| 5187 | var ownerFiber = owner; |
| 5188 | var instance = ownerFiber.stateNode; |
| 5189 | 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'); |
| 5190 | instance._warnedAboutRefsInRender = true; |
| 5191 | } |
| 5192 | } |
| 5193 | |
| 5194 | var fiber = get(component); |
| 5195 | if (!fiber) { |
| 5196 | return false; |
| 5197 | } |
| 5198 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 5199 | } |
| 5200 | |
| 5201 | function assertIsMounted(fiber) { |
| 5202 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected