(finishedWork: FiberNode, isHidden: boolean)
| 167 | } |
| 168 | |
| 169 | function hideOrUnhideAllChildren(finishedWork: FiberNode, isHidden: boolean) { |
| 170 | findHostSubtreeRoot(finishedWork, (hostRoot) => { |
| 171 | const instance = hostRoot.stateNode; |
| 172 | if (hostRoot.tag === HostComponent) { |
| 173 | isHidden ? hideInstance(instance) : unhideInstance(instance); |
| 174 | } else if (hostRoot.tag === HostText) { |
| 175 | isHidden |
| 176 | ? hideTextInstance(instance) |
| 177 | : unhideTextInstance(instance, hostRoot.memoizedProps.content); |
| 178 | } |
| 179 | }); |
| 180 | } |
| 181 | |
| 182 | function safelyDetachRef(current: FiberNode) { |
| 183 | const ref = current.ref; |
no test coverage detected