Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read debugRenderPhaseSideEffects from GK #11603

Merged
merged 2 commits into from
Nov 20, 2017

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Nov 20, 2017

We plan to opt some engineers into this newly-added GK to help identify unsafe side-effects within lifecycle hooks and setState callbacks. This PR adds the ability to determine this value at runtime (rather than static as it is for NPM builds) .

Verified that this inserts the following line to the fbsource and www builds:

var debugRenderPhaseSideEffects = require("ReactFeatureFlags").debugRenderPhaseSideEffects;

For the www build, this should be a simple matter of reading this value from the GK module.

I'm not sure yet of the best way to inject it for React Native builds, given that the Rollup build reads the value from ReactFeatureFlags during initialization. We'll have to make sure that app code injects before ReactNative is initialized. I believe this should be possible, but it may depend on how we hoist requires in that environment.

@bvaughn bvaughn changed the title Forked ReactFeatureFlags for RN to enable debugRenderPhaseSideEffects GK Plug debugRenderPhaseSideEffects into www/fbsource feature flags for GK Nov 20, 2017
@bvaughn bvaughn changed the title Plug debugRenderPhaseSideEffects into www/fbsource feature flags for GK Read debugRenderPhaseSideEffects from GK Nov 20, 2017
@bvaughn bvaughn merged commit dbf715c into facebook:master Nov 20, 2017
@bvaughn bvaughn deleted the react-native-fbsource-feature-flags branch November 20, 2017 22:05
raphamorim pushed a commit to raphamorim/react that referenced this pull request Nov 27, 2017
* Forked ReactFeatureFlags for React Native to enable debugRenderPhaseSideEffects GK
* Changed debugRenderPhaseSideEffects in www feature flags to be runtime as well
Ethan-Arrowood pushed a commit to Ethan-Arrowood/react that referenced this pull request Dec 8, 2017
* Forked ReactFeatureFlags for React Native to enable debugRenderPhaseSideEffects GK
* Changed debugRenderPhaseSideEffects in www feature flags to be runtime as well
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.

None yet

3 participants