Skip to content

Quick fix for grabbing wrong rAF polyfill in ReactScheduler#12831

Closed
flarnie wants to merge 2 commits intofacebook:masterfrom
flarnie:quickFixForRAFPolyfillIssue
Closed

Quick fix for grabbing wrong rAF polyfill in ReactScheduler#12831
flarnie wants to merge 2 commits intofacebook:masterfrom
flarnie:quickFixForRAFPolyfillIssue

Conversation

@flarnie
Copy link
Contributor

@flarnie flarnie commented May 16, 2018

what is the change?:
We need to grab a slightly different implementation of rAF internally at
FB than in Open Source. Making rAF a dependency of the ReactScheduler
module allows us to fork the dependency at FB.

why make this change?:
This fixes a problem we're running into when experimenting with
ReactScheduler internally at Facebook, *and it's part of our long term
plan to use dependency injection with the scheduler to make it easier to
test and adjust.

test plan:
Ran tests, lint, flow, and will manually test when syncing into
Facebook's codebase.

issue:
See internal task T29442940

**what is the change?:**
We need to grab a slightly different implementation of rAF internally at
FB than in Open Source. Making rAF a dependency of the ReactScheduler
module allows us to fork the dependency at FB.

**why make this change?:**
This fixes a problem we're running into when experimenting with
ReactScheduler internally at Facebook, **and* it's part of our long term
plan to use dependency injection with the scheduler to make it easier to
test and adjust.

**test plan:**
Ran tests, lint, flow, and will manually test when syncing into
Facebook's codebase.

**issue:**
See internal task T29442940
**what is the change?:**
see title

**why make this change?:**
I realized we don't want Flow to run on this file.

**test plan:**
yarn flow
@sebmarkbage
Copy link
Contributor

and it's part of our long term plan to use dependency injection with the scheduler

wut? I don't think we should use DI.

We should just fix FB to properly allow any third party code (like React) to use the native rAF.

@flarnie
Copy link
Contributor Author

flarnie commented May 16, 2018

Maybe I should message you @sebmarkbage - this was something Andrew and I discussed.

But for a short term fix we can also change things on the Facebook side.

@sebmarkbage
Copy link
Contributor

sebmarkbage commented May 16, 2018

We've worked really hard to avoid forks so not happy seeing them return. (We're almost ready to get rid of the forked event emitters.)

@gaearon
Copy link
Collaborator

gaearon commented May 16, 2018

(Didn't see Seb's comment before approving. I agree we should probably fix it in www, we know how hard is it?)

@flarnie
Copy link
Contributor Author

flarnie commented May 16, 2018

I'll investigate fixing it on www, closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants