(component)
| 5239 | } |
| 5240 | |
| 5241 | function isMounted(component) { |
| 5242 | { |
| 5243 | var owner = ReactCurrentOwner.current; |
| 5244 | if (owner !== null && owner.tag === ClassComponent) { |
| 5245 | var ownerFiber = owner; |
| 5246 | var instance = ownerFiber.stateNode; |
| 5247 | 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'); |
| 5248 | instance._warnedAboutRefsInRender = true; |
| 5249 | } |
| 5250 | } |
| 5251 | |
| 5252 | var fiber = get(component); |
| 5253 | if (!fiber) { |
| 5254 | return false; |
| 5255 | } |
| 5256 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 5257 | } |
| 5258 | |
| 5259 | function assertIsMounted(fiber) { |
| 5260 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected