-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
38 lines (37 loc) · 1.27 KB
/
Copy pathApp.js
File metadata and controls
38 lines (37 loc) · 1.27 KB
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
import React from "react";
import { View } from "react-native";
import {
AppProvider,
UserProvider,
RealmProvider,
useRealm
} from "@realm/react";
import { createRealmContext } from "@realm/react";
import HomeScreen from "./screens/HomeScreen";
import AuthScreen from "./screens/AuthScreen";
import styles from "./styling/Style";
import WelcomeScreen from "./screens/WelcomeScreen";
import { wordSchema, SuperMemoSchema } from "./api/schema";
// This is the main component of the app
export default function App() {
return (
// The top-level container for the app
<View style={styles.container}>
{/* The AppProvider component provides the app with an ID */}
<AppProvider id={"besocial-kovas"} >
{/* The UserProvider component provides the app with a fallback screen */}
<UserProvider fallback={<AuthScreen />}>
{/* The RealmProvider component provides the app with a Realm database */}
<RealmProvider
schema={[SuperMemoSchema, wordSchema]}
>
{/* The WelcomeScreen component is the first screen the user sees */}
<View style={styles.container}>
<WelcomeScreen/>
</View>
</RealmProvider>
</UserProvider>
</AppProvider>
</View>
);
}