-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
26 lines (21 loc) · 761 Bytes
/
index.js
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
/** @format */
import {AppRegistry} from 'react-native';
import { createNavigation } from './src/components/helpers/Navigation'
import { Database } from '@nozbe/watermelondb'
import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite'
import Blog from './src/models/Blog'
import Post from './src/models/Post'
import Comment from './src/models/Comment'
import { mySchema } from './src/models/schema'
// import App from './App';
import {name as appName} from './app.json';
const adapter = new SQLiteAdapter({
dbName: 'WatermelonDemo',
schema: mySchema,
})
global.database = new Database({
adapter,
modelClasses: [Blog, Post, Comment],
})
const Navigation = createNavigation({ database })
AppRegistry.registerComponent(appName, () => Navigation);