(component)
| 5146 | } |
| 5147 | |
| 5148 | function isMounted(component) { |
| 5149 | { |
| 5150 | var owner = ReactCurrentOwner.current; |
| 5151 | if (owner !== null && owner.tag === ClassComponent) { |
| 5152 | var ownerFiber = owner; |
| 5153 | var instance = ownerFiber.stateNode; |
| 5154 | 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'); |
| 5155 | instance._warnedAboutRefsInRender = true; |
| 5156 | } |
| 5157 | } |
| 5158 | |
| 5159 | var fiber = get(component); |
| 5160 | if (!fiber) { |
| 5161 | return false; |
| 5162 | } |
| 5163 | return isFiberMountedImpl(fiber) === MOUNTED; |
| 5164 | } |
| 5165 | |
| 5166 | function assertIsMounted(fiber) { |
| 5167 | !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; |
nothing calls this directly
no test coverage detected