Skip to content

Commit ad8a892

Browse files
author
Omer Lachish 👾
committed
add usage example to example project
1 parent 453a269 commit ad8a892

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

example/index.ios.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import React, {
1111
View
1212
} from 'react-native';
1313

14+
var RequiresConnection = require('react-native-offline-mode')
15+
1416
class example extends Component {
1517
render() {
1618
return (
@@ -49,4 +51,4 @@ const styles = StyleSheet.create({
4951
},
5052
});
5153

52-
AppRegistry.registerComponent('example', () => example);
54+
AppRegistry.registerComponent('example', () => RequiresConnection(example));

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"dependencies": {
99
"react": "^0.14.8",
10-
"react-native": "^0.23.0"
10+
"react-native": "^0.23.0",
11+
"react-native-offline-mode": "https://github.com/rauchy/react-native-offline-mode"
1112
}
1213
}

0 commit comments

Comments
 (0)