dillon1000/react

Commit

[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
Browse files
Changed paths8 files
First-parent comparison
M packages/react-art/src/ReactARTHostConfig.js ModifiedM packages/react-dom/src/client/ReactDOMHostConfig.js ModifiedM packages/react-scheduler/src/ReactScheduler.js ModifiedA packages/shared/ReactScheduler.js AddedA packages/shared/forks/ReactScheduler.www.js AddedM packages/shared/requestAnimationFrameForReact.js ModifiedM scripts/rollup/bundles.js ModifiedM scripts/rollup/forks.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…