mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 00:20:28 +01:00
Expiration times are computed by adding to the current time (the start time). However, if two updates are scheduled within the same event, we should treat their start times as simultaneous, even if the actual clock time has advanced between the first and second call. In other words, because expiration times determine how updates are batched, we want all updates of like priority that occur within the same event to receive the same expiration time. Otherwise we get tearing. We keep track of two separate times: the current "renderer" time and the current "scheduler" time. The renderer time can be updated whenever; it only exists to minimize the calls performance.now. But the scheduler time can only be updated if there's no pending work, or if we know for certain that we're not in the middle of an event. |
||
|---|---|---|
| .. | ||
| npm | ||
| src | ||
| index.js | ||
| package.json | ||
| persistent.js | ||
| README.md | ||