-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Disable classic features in the modern WWW build #18013
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a73fbc3
Move getIsHydrating from FB fork to Experimental flag
gaearon cef433b
Add FB_WWW_MODERN bundle types
gaearon 6b32ea0
Use unforked entry points for modern builds
gaearon b390105
Only use EventListener shim in classic WWW builds
gaearon 3899446
Fork feature flags for modern and classic WWW
gaearon c3d4f6a
Disable a bunch of classic features for modern builds
gaearon 4c8e018
Add a flag to disable legacy ReactDOM APIs and set it for modern builds
gaearon 0a11ab3
Put field assignment behind a condition
gaearon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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,86 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags'; | ||
import typeof * as FeatureFlagsShimType from './ReactFeatureFlags.www-modern'; | ||
|
||
// Re-export dynamic flags from the www version. | ||
export const { | ||
debugRenderPhaseSideEffectsForStrictMode, | ||
disableInputAttributeSyncing, | ||
enableTrustedTypesIntegration, | ||
deferPassiveEffectCleanupDuringUnmount, | ||
warnAboutShorthandPropertyCollision, | ||
} = require('ReactFeatureFlags'); | ||
|
||
export let enableUserTimingAPI = false; | ||
|
||
export const enableProfilerTimer = __PROFILE__; | ||
export const enableSchedulerTracing = __PROFILE__; | ||
export const enableSchedulerDebugging = true; | ||
|
||
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false; | ||
export const warnAboutDeprecatedLifecycles = true; | ||
export const disableLegacyContext = true; | ||
export const warnAboutStringRefs = false; | ||
export const warnAboutDefaultPropsOnFunctionComponents = false; | ||
export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; | ||
|
||
export const enableTrainModelFix = true; | ||
|
||
export const exposeConcurrentModeAPIs = __EXPERIMENTAL__; | ||
|
||
export const enableSuspenseServerRenderer = true; | ||
export const enableSelectiveHydration = true; | ||
|
||
export const enableChunksAPI = __EXPERIMENTAL__; | ||
|
||
export const disableJavaScriptURLs = true; | ||
|
||
export function addUserTimingListener() { | ||
throw new Error('Not implemented.'); | ||
} | ||
|
||
export const enableDeprecatedFlareAPI = true; | ||
|
||
export const enableFundamentalAPI = false; | ||
|
||
export const enableScopeAPI = true; | ||
|
||
export const enableJSXTransformAPI = true; | ||
|
||
export const warnAboutUnmockedScheduler = true; | ||
|
||
export const enableSuspenseCallback = true; | ||
|
||
export const flushSuspenseFallbacksInTests = true; | ||
|
||
export const enableNativeTargetAsInstance = false; | ||
|
||
export const disableCreateFactory = false; | ||
|
||
export const disableLegacyReactDOMAPIs = true; | ||
|
||
export const disableTextareaChildren = true; | ||
|
||
export const disableMapsAsChildren = true; | ||
|
||
export const disableUnstableRenderSubtreeIntoContainer = true; | ||
|
||
export const warnUnstableRenderSubtreeIntoContainer = false; | ||
|
||
export const disableUnstableCreatePortal = true; | ||
|
||
export const isTestEnvironment = false; | ||
|
||
// Flow magic to verify the exports of this file match the original version. | ||
// eslint-disable-next-line no-unused-vars | ||
type Check<_X, Y: _X, X: Y = _X> = null; | ||
// eslint-disable-next-line no-unused-expressions | ||
(null: Check<FeatureFlagsShimType, FeatureFlagsType>); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment to group the two sets up more? I’m worried people will add to the bottom of this list and it will get muddled up otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 100% copy paste from the other file. I agree we should clean it up but let's do this separately from this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.