(component)
| 4379 | } |
| 4380 | |
| 4381 | function isMounted(component) { |
| 4382 | { |
| 4383 | var owner = ReactCurrentOwner.current; |
| 4384 | if (owner !== null && owner.tag === ClassComponent) { |
| 4385 | var ownerFiber = owner; |
| 4386 | var instance = ownerFiber.stateNode; |
| 4387 | 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'); |
| 4388 | instance._warnedAboutRefsInRender = true; |
| 4389 | } |
| 4390 | } |
| 4391 | |
| 4392 | var fiber = get(component); |
| 4393 | if (!fiber) { |
| 4394 | return false; |
| 4395 | } |
| 4396 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 4397 | } |
| 4398 | |
| 4399 | function assertIsMounted(fiber) { |
| 4400 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected