-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
40 lines (33 loc) · 951 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the TypeScript template
* https://github.com/react-native-community/react-native-template-typescript
*
* @format
*/
import React from 'react';
import NavigationRouter from './app/NavigationRouter';
import DatabaseProvider from '@nozbe/watermelondb/DatabaseProvider';
import { database } from './app/database/configureDB';
const App = () => {
/// ReactNativeFlipperDatabases - START
if (__DEV__) {
// Import connectDatabases function and required DBDrivers
const {
connectDatabases,
WatermelonDB,
} = require('react-native-flipper-databases');
connectDatabases([
new WatermelonDB(database), // Pass in database definition
]);
}
/// ReactNativeFlipperDatabases - END
return (
<DatabaseProvider database={database}>
<NavigationRouter />
</DatabaseProvider>
);
};
export default App;