[size: tiny] Rename methods exposed by ReactScheduler#12742
[size: tiny] Rename methods exposed by ReactScheduler#12742flarnie wants to merge 1 commit intofacebook:masterfrom
ReactScheduler#12742Conversation
**what is the change?:** `rIC` -> `scheduleSerialCallback` We will later expose a second method called `scheduleDeferredCallback`, for different priority levels. `cIC` -> `cancelScheduledCallback` This method can be used to cancel callbacks scheduled at either serial or deferred priority. **why make this change?:** Originally this module contained a polyfill for `requestIdleCallback` and `cancelIdleCallback` but we are changing the behavior so it's no longer just a polyfill. The new names are more semantic and distinguish this from the original polyfill functionality. **test plan:** Ran the tests
|
if |
|
I don’t think so.
(Emphasis mine) |
|
Ah, my bad. I skimmed the PR description and missed that. Seems a little odd, initially, to have separate scheduling methods and a shared cancel method, but I haven't thought about it much. 😄 |
|
Yea, I had initially assumed we would have a separate cancel method for each priority, but we don't actually need different behavior for cancelling. It's always the same. |
|
Let's bikeshed these offiline. I don't like |
|
@sebmarkbage had brought up that we haven't renamed these methods yet - so let's just bookmark that we're holding off on choosing names until we have time to discuss at length. |
Going to make incremental PRs with the changes we discussed. This is a quick and easy one to start with.
what is the change?:
rIC->scheduleSerialCallbackWe will later expose a second method called
scheduleDeferredCallback,for different priority levels.
cIC->cancelScheduledCallbackThis method can be used to cancel callbacks scheduled at either serial
or deferred priority.
why make this change?:
Originally this module contained a polyfill for
requestIdleCallbackand
cancelIdleCallbackbut we are changing the behavior so it's nolonger just a polyfill. The new names are more semantic and distinguish
this from the original polyfill functionality.
test plan:
Ran the tests