File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ class AppContainer extends React.Component {
28
28
generation : 0 ,
29
29
} ;
30
30
31
+ constructor ( props ) {
32
+ super ( props ) ;
33
+ if ( configuration . showReactDomPatchNotification ) {
34
+ configuration . showReactDomPatchNotification = false ;
35
+ console . warn ( 'React-Hot-Loader: react-🔥-dom patch is not detected. React 16.6+ features may not work.' ) ;
36
+ }
37
+ }
38
+
31
39
shouldComponentUpdate ( prevProps , prevState ) {
32
40
// Don't update the component if the state had an error and still has one.
33
41
// This allows to break an infinite loop of error -> render -> error -> render
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ const configuration = {
17
17
// Disable "hot-replacement-render" when injection into react-dom is made
18
18
disableHotRendererWhenInjected : false ,
19
19
20
+ // Controls `react-🔥-dom patch` notification
21
+ showReactDomPatchNotification : true ,
22
+
20
23
// Hook on babel component register.
21
24
onComponentRegister : false ,
22
25
Original file line number Diff line number Diff line change @@ -106,10 +106,8 @@ const reactHotLoader = {
106
106
configuration . ignoreSFC = configuration . ignoreSFCWhenInjected ;
107
107
108
108
reactHotLoader . IS_REACT_MERGE_ENABLED = true ;
109
+ configuration . showReactDomPatchNotification = false ;
109
110
// console.warn('react-🔥-loader activated.');
110
- } else {
111
- // Actually everything works...
112
- console . warn ( 'React-Hot-Loader: react-🔥-dom patch is not detected. React 16.6+ features may not work.' ) ;
113
111
}
114
112
/* eslint-enable */
115
113
if ( ! React . createElement . isPatchedByReactHotLoader ) {
You can’t perform that action at this time.
0 commit comments