File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,18 @@ import {
6
6
} from 'react-native' ;
7
7
8
8
// Flip this bool!
9
- const someCondition = true ;
9
+ const someCondition = false ;
10
10
11
11
class App extends React . Component {
12
12
state = { webValue : null , nativeValue : null }
13
13
14
14
componentDidMount ( ) {
15
15
if ( someCondition ) {
16
16
import ( './dynamic-module' ) . then ( module => {
17
+ // This should work fine in RN
17
18
module . reactNative ( ) . then ( val => this . setState ( { nativeValue : val [ 1 ] } ) ) ;
18
19
// Following line generates warnings of no reference to localstorage
19
- // this.setState({ webValue: module.reactWeb() });
20
+ this . setState ( { webValue : module . reactWeb ( ) } ) ;
20
21
} )
21
22
}
22
23
}
@@ -25,7 +26,6 @@ class App extends React.Component {
25
26
return (
26
27
< Fragment >
27
28
< SafeAreaView >
28
- < Text > Hey There! This is a sample app! </ Text >
29
29
< Text > webValue: { this . state . webValue || 'null' } </ Text >
30
30
< Text > nativeValue: { this . state . nativeValue || 'null' } </ Text >
31
31
</ SafeAreaView >
You can’t perform that action at this time.
0 commit comments