(component)
| 5284 | } |
| 5285 | |
| 5286 | function isMounted(component) { |
| 5287 | { |
| 5288 | var owner = ReactCurrentOwner.current; |
| 5289 | if (owner !== null && owner.tag === ClassComponent) { |
| 5290 | var ownerFiber = owner; |
| 5291 | var instance = ownerFiber.stateNode; |
| 5292 | 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'); |
| 5293 | instance._warnedAboutRefsInRender = true; |
| 5294 | } |
| 5295 | } |
| 5296 | |
| 5297 | var fiber = get(component); |
| 5298 | if (!fiber) { |
| 5299 | return false; |
| 5300 | } |
| 5301 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 5302 | } |
| 5303 | |
| 5304 | function assertIsMounted(fiber) { |
| 5305 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected