-
Notifications
You must be signed in to change notification settings - Fork 47.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scheduler] 4/n Allow splitting out
schedule
in fb-www, prepare to …
…fix polyfill issue internally (#12900) * Use local references to global things inside 'scheduler' **what is the change?:** See title **why make this change?:** We want to avoid initially calling one version of an API and then later accessing a polyfilled version. **test plan:** Run existing tests. * Shim ReactScheduler for www **what is the change?:** In 'www' we want to reference the separate build of ReactScheduler, which allows treating it as a separate module internally. **why make this change?:** We need to require the ReactScheduler before our rAF polyfill activates, in order to customize which custom behaviors we want. This is also a step towards being able to experiment with using it outside of React. **test plan:** Ran tests, ran the build, and ran `test-build`. * Generate a bundle for fb-www **what is the change?:** See title **why make this change?:** Splitting out the 'schedule' module allows us to load it before polyfills kick in for rAF and other APIs. And long term we want to split this into a separate module anyway, this is a step towards that. **test plan:** I'll run the sync next week and verify that this all works. :) * ran prettier * fix rebase issues * Change names of variables used for holding globals
- Loading branch information
Showing
8 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
'use strict'; | ||
import { | ||
now, | ||
scheduleWork, | ||
cancelScheduledWork, | ||
} from 'react-scheduler/src/ReactScheduler'; | ||
|
||
export {now, scheduleWork, cancelScheduledWork}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
const {now, scheduleWork, cancelScheduledWork} = require('customSchedule'); | ||
|
||
export {now, scheduleWork, cancelScheduledWork}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters