mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Silence Fiber warning when the feature flag is on
When the feature flag is on, we should silence the warning since we're explicitly testing it. This is needed when running unit tests with the flag on.
This commit is contained in:
1 parent
cafa7b284a
commit
8d3a58de62
1 file changed
+3
-1
@@ -15,6 +15,7 @@
|
||||
import type { HostChildren } from 'ReactFiberReconciler';
|
||||
|
||||
var ReactFiberReconciler = require('ReactFiberReconciler');
|
||||
var ReactDOMFeatureFlags = require('ReactDOMFeatureFlags');
|
||||
|
||||
var warning = require('warning');
|
||||
|
||||
@@ -98,8 +99,9 @@ var DOMRenderer = ReactFiberReconciler({
|
||||
var warned = false;
|
||||
|
||||
function warnAboutUnstableUse() {
|
||||
// Ignore this warning is the feature flag is turned on. E.g. for tests.
|
||||
warning(
|
||||
warned,
|
||||
warned || ReactDOMFeatureFlags.useFiber,
|
||||
'You are using React DOM Fiber which is an experimental renderer. ' +
|
||||
'It is likely to have bugs, breaking changes and is unsupported.'
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user