UNPKG

745 BTypeScriptView Raw
1import * as React from 'react';
2export declare const ScheduleUpdateContext: React.Context<{
3 scheduleUpdate: (callback: () => void) => void;
4 flushUpdates: () => void;
5}>;
6/**
7 * When screen config changes, we want to update the navigator in the same update phase.
8 * However, navigation state is in the root component and React won't let us update it from a child.
9 * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState.
10 * It lets all subsequent updates access the latest state so it stays correct.
11 * Then we call setState during after the component updates.
12 */
13export default function useScheduleUpdate(callback: () => void): void;
14//# sourceMappingURL=useScheduleUpdate.d.ts.map
\No newline at end of file