( root: FiberRoot, update: RefreshUpdate, )
| 220 | } |
| 221 | |
| 222 | export const scheduleRefresh: ScheduleRefresh = ( |
| 223 | root: FiberRoot, |
| 224 | update: RefreshUpdate, |
| 225 | ): void => { |
| 226 | if (__DEV__) { |
| 227 | if (resolveFamily === null) { |
| 228 | // Hot reloading is disabled. |
| 229 | return; |
| 230 | } |
| 231 | const {staleFamilies, updatedFamilies} = update; |
| 232 | flushPendingEffects(); |
| 233 | scheduleFibersWithFamiliesRecursively( |
| 234 | root.current, |
| 235 | updatedFamilies, |
| 236 | staleFamilies, |
| 237 | ); |
| 238 | flushSyncWork(); |
| 239 | } |
| 240 | }; |
| 241 | |
| 242 | export const scheduleRoot: ScheduleRoot = ( |
| 243 | root: FiberRoot, |
no test coverage detected