| 3033 | } |
| 3034 | |
| 3035 | function startTransition(scope, options) { |
| 3036 | var prevTransition = ReactCurrentBatchConfig.transition; |
| 3037 | ReactCurrentBatchConfig.transition = {}; |
| 3038 | var currentTransition = ReactCurrentBatchConfig.transition; |
| 3039 | |
| 3040 | { |
| 3041 | ReactCurrentBatchConfig.transition._updatedFibers = new Set(); |
| 3042 | } |
| 3043 | |
| 3044 | try { |
| 3045 | scope(); |
| 3046 | } finally { |
| 3047 | ReactCurrentBatchConfig.transition = prevTransition; |
| 3048 | |
| 3049 | { |
| 3050 | if (prevTransition === null && currentTransition._updatedFibers) { |
| 3051 | var updatedFibersCount = currentTransition._updatedFibers.size; |
| 3052 | |
| 3053 | if (updatedFibersCount > 10) { |
| 3054 | warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); |
| 3055 | } |
| 3056 | |
| 3057 | currentTransition._updatedFibers.clear(); |
| 3058 | } |
| 3059 | } |
| 3060 | } |
| 3061 | } |
| 3062 | |
| 3063 | var didWarnAboutMessageChannel = false; |
| 3064 | var enqueueTaskImpl = null; |