Skip to content

Commit 104b1f9

Browse files
EvanBaconfacebook-github-bot
authored andcommitted
Add HMRLoadingView module for web target (#23389)
Summary: * Added a default value for HMRLoadingView this will prevent errors from being thrown when `HMRClient` attempts to include it in a `web` context. * [Web] [Added] - HMRLoadingView Pull Request resolved: #23389 Differential Revision: D14045475 Pulled By: cpojer fbshipit-source-id: df5c3cf3536af3b37eaf82342b6346bc25054319
1 parent b0c69ab commit 104b1f9

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

.flowconfig

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
; require from fbjs/lib instead: require('fbjs/lib/warning')
2727
.*/node_modules/warning/.*
2828

29+
; Flow doesn't support platforms
30+
.*/Libraries/Utilities/HMRLoadingView.js
31+
2932
[untyped]
3033
.*/node_modules/@react-native-community/cli/.*/.*
3134

.flowconfig.android

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
; require from fbjs/lib instead: require('fbjs/lib/warning')
2727
.*/node_modules/warning/.*
2828

29+
; Flow doesn't support platforms
30+
.*/Libraries/Utilities/HMRLoadingView.js
31+
2932
[untyped]
3033
.*/node_modules/@react-native-community/cli/.*/.*
3134

Libraries/Utilities/HMRLoadingView.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
* @flow strict-local
9+
*/
10+
11+
'use strict';
12+
13+
class HMRLoadingView {
14+
static showMessage(message: string) {
15+
// noop
16+
}
17+
18+
static hide() {
19+
// noop
20+
}
21+
}
22+
23+
module.exports = HMRLoadingView;

0 commit comments

Comments
 (0)