diff --git a/App.tsx b/App.tsx
index e2ebb91..57dc5d9 100644
--- a/App.tsx
+++ b/App.tsx
@@ -1,12 +1,26 @@
import React from 'react';
-import { Provider } from 'react-native-paper';
-import App from './src';
+import { Provider as PaperProvider } from 'react-native-paper';
+import { NavigationContainer } from '@react-navigation/native';
import { theme } from './src/core/theme';
+import Main from './src';
-const Main = () => (
-
-
-
-);
+const linking = {
+ prefixes: [],
+ config: {
+ screens: {
+ "Home": "home",
+ "Login": "login",
+ "Register": "register",
+ "Forgot Password": "forgot-password",
+ "Dashboard": "dashboard"
+ }
+ }
+}
-export default Main;
+export default () => (
+
+
+
+
+
+);
\ No newline at end of file
diff --git a/README.md b/README.md
index 7723592..64ba33e 100644
--- a/README.md
+++ b/README.md
@@ -23,12 +23,12 @@ npm install
yarn install
```
-3. Run project on iOS / Android.
+3. Run project on iOS / Android / Web.
```js
- npm run ios // npm run android
+ npm run ios // npm run android // npm run web
// or
- yarn ios // yarn android
+ yarn ios // yarn android // yarn web
```
Project was created using [Expo](https://expo.io/). If you want standard native project please run following command:
diff --git a/app.json b/app.json
index 2827a51..8a0a3a5 100644
--- a/app.json
+++ b/app.json
@@ -3,8 +3,11 @@
"name": "React Native Paper Login Template",
"slug": "react-native-paper-login-template",
"privacy": "public",
- "sdkVersion": "35.0.0",
- "platforms": ["ios", "android", "web"],
+ "platforms": [
+ "ios",
+ "android",
+ "web"
+ ],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
@@ -16,7 +19,9 @@
"updates": {
"fallbackToCacheTimeout": 0
},
- "assetBundlePatterns": ["**/*"],
+ "assetBundlePatterns": [
+ "**/*"
+ ],
"ios": {
"supportsTablet": true
}
diff --git a/package.json b/package.json
index 1a2e119..5a386bb 100644
--- a/package.json
+++ b/package.json
@@ -8,24 +8,24 @@
"eject": "expo eject"
},
"dependencies": {
- "expo": "^35.0.0",
- "react": "16.8.3",
- "react-dom": "16.8.3",
- "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
- "react-native-gesture-handler": "1.3.0",
- "react-native-paper": "^3.0.0",
+ "expo": "^40.0.0",
+ "react": "16.13.1",
+ "react-dom": "16.13.1",
+ "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
+ "react-native-gesture-handler": "~1.8.0",
+ "react-native-paper": "^4.7.2",
+ "react-native-screens": "~2.15.2",
"react-native-status-bar-height": "^2.4.0",
- "react-native-screens": "^2.2.0",
- "react-native-web": "^0.11.7",
- "react-navigation": "^4.0.10",
- "react-navigation-stack": "^1.10.2"
+ "react-native-web": "~0.14.13",
+ "@react-navigation/native": "^5.9.3",
+ "@react-navigation/stack": "^5.14.3"
},
"devDependencies": {
- "@types/react": "^16.8.23",
- "@types/react-native": "^0.57.65",
- "babel-preset-expo": "^7.1.0",
+ "@types/react": "~16.9.35",
+ "@types/react-native": "~0.63.2",
+ "babel-preset-expo": "8.3.0",
"prettier": "^1.18.2",
- "typescript": "^3.6.3"
+ "typescript": "~4.0.0"
},
"private": true
}
diff --git a/src/components/Background.tsx b/src/components/Background.tsx
index 21a0021..8333ef7 100644
--- a/src/components/Background.tsx
+++ b/src/components/Background.tsx
@@ -25,6 +25,7 @@ const styles = StyleSheet.create({
background: {
flex: 1,
width: '100%',
+ backgroundColor: '#ffffff'
},
container: {
flex: 1,
diff --git a/src/core/theme.tsx b/src/core/theme.tsx
index cb1dfed..d7759bd 100644
--- a/src/core/theme.tsx
+++ b/src/core/theme.tsx
@@ -1,11 +1,14 @@
-import { DefaultTheme } from 'react-native-paper';
+import { DefaultTheme as PaperDefaultTheme } from 'react-native-paper';
+import { DefaultTheme as NavigationDefaultTheme } from '@react-navigation/native';
export const theme = {
- ...DefaultTheme,
+ ...PaperDefaultTheme,
+ ...NavigationDefaultTheme,
colors: {
- ...DefaultTheme.colors,
+ ...PaperDefaultTheme.colors,
+ ...NavigationDefaultTheme.colors,
primary: '#600EE6',
secondary: '#414757',
- error: '#f13a59',
+ error: '#f13a59'
},
};
diff --git a/src/index.tsx b/src/index.tsx
index fe35c3f..4b2bf22 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,6 +1,5 @@
-import { createAppContainer } from 'react-navigation';
-import { createStackNavigator } from 'react-navigation-stack';
-
+import React from 'react';
+import { createStackNavigator } from '@react-navigation/stack';
import {
HomeScreen,
LoginScreen,
@@ -9,18 +8,17 @@ import {
Dashboard,
} from './screens';
-const Router = createStackNavigator(
- {
- HomeScreen,
- LoginScreen,
- RegisterScreen,
- ForgotPasswordScreen,
- Dashboard,
- },
- {
- initialRouteName: 'HomeScreen',
- headerMode: 'none',
- }
-);
+const Stack = createStackNavigator();
-export default createAppContainer(Router);
+export default () => (
+
+
+
+
+
+
+
+)
\ No newline at end of file
diff --git a/src/screens/Dashboard.tsx b/src/screens/Dashboard.tsx
index 9426ae7..cfd041a 100644
--- a/src/screens/Dashboard.tsx
+++ b/src/screens/Dashboard.tsx
@@ -18,7 +18,7 @@ const Dashboard = ({ navigation }: Props) => (
Your amazing app starts here. Open you favourite code editor and start
editing this project.
-