dillon1000/react
Commit
Browse files Rename variables to remove references to 'global' global (#12931)
**what is the change?:** In a recent PR we were referencing some global variables and storing local references to them. To make things more natural, we co-opted the original name of the global for our local reference. To make this work with Flow, we get the original reference from 'window.requestAnimationFrame' and assign it to 'const requestAnimationFrame'. Sometimes React is used in an environment where 'window' is not defined - in that case we need to use something else, or hide the 'window' reference somewhere. We opted to use 'global' thinking that Babel transforms would fill that in with the proper thing. But for some of our fixtures we are not doing that transform on the bundle. **why make this change?:** I want to unbreak this on master and then investigate more about what we should do to fix this. **test plan:** run `yarn build` and open the fixtures. **issue:** https://github.com/facebook/react/issues/12930
Changed paths2 files
First-parent comparisonpackages/react-scheduler/src/ReactScheduler.js ModifiedM packages/shared/requestAnimationFrameForReact.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…