diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 0000000..f7eb5fe --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,8 @@ +> Why do I have a folder named ".expo" in my project? +The ".expo" folder is created when an Expo project is started using "expo start" command. +> What do the files contain? +- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds. +- "settings.json": contains the server configuration that is used to serve the application manifest. +> Should I commit the ".expo" folder? +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/README.md b/README.md index 2eea98a..ea0f4db 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ -# AppTest +# Expo Router Example + +Use [`expo-router`](https://expo.github.io/router) to build native navigation using files in the `app/` directory. + +## 🚀 How to use + +```sh +npx create-react-native-app -t with-router +``` + +## 📝 Notes + +- [Expo Router: Docs](https://expo.github.io/router) +- [Expo Router: Repo](https://github.com/expo/router) +- [Request for Comments](https://github.com/expo/router/discussions/1) diff --git a/______Working/_layout.js b/______Working/_layout.js new file mode 100644 index 0000000..81acef2 --- /dev/null +++ b/______Working/_layout.js @@ -0,0 +1,3 @@ +import { Tabs } from "expo-router"; + +export default Tabs; diff --git a/______Working/details.js b/______Working/details.js new file mode 100644 index 0000000..a422687 --- /dev/null +++ b/______Working/details.js @@ -0,0 +1,10 @@ +import { View } from "react-native"; +import { Link, Stack } from "expo-router"; + +export default function Details({ navigation }) { + return ( + + Go to Index + + ); +} diff --git a/______Working/name.js b/______Working/name.js new file mode 100644 index 0000000..6a8d756 --- /dev/null +++ b/______Working/name.js @@ -0,0 +1,14 @@ +import { View } from "react-native"; +import { Link, Stack } from "expo-router"; + +export default function Home() { + return ( + + {/* Use the `Screen` component to configure the layout. */} + + {/* Use the `Link` component to enable optimized client-side routing. */} + Go to Details + Go to test1 + + ); +} diff --git a/______Working/stephan/name.js b/______Working/stephan/name.js new file mode 100644 index 0000000..d73e223 --- /dev/null +++ b/______Working/stephan/name.js @@ -0,0 +1,15 @@ +import { View, Text } from "react-native"; +import { Link, Stack } from "expo-router"; + +export default function Home() { + return ( + + {/* Use the `Screen` component to configure the layout. */} + + Name + {/* Use the `Link` component to enable optimized client-side routing. */} + Go to Details + Go to test1 + + ); +} diff --git a/______Working/stephan/name2.js b/______Working/stephan/name2.js new file mode 100644 index 0000000..8b5113a --- /dev/null +++ b/______Working/stephan/name2.js @@ -0,0 +1,15 @@ +import { View, Text } from "react-native"; +import { Link, Stack } from "expo-router"; + +export default function Home() { + return ( + + {/* Use the `Screen` component to configure the layout. */} + + Name 2 + {/* Use the `Link` component to enable optimized client-side routing. */} + Go to Details + Go to test1 + + ); +} diff --git a/______Working/test1.js b/______Working/test1.js new file mode 100644 index 0000000..4f55ed7 --- /dev/null +++ b/______Working/test1.js @@ -0,0 +1,22 @@ +// importzone start +import StephanTestComponent from "stephan-test-component"; +// importzone end + +const test1 = (props) => { + return ( + <> + {/*componentzone start*/} + + {/*componentzone end*/} + + ); +}; + +export default test1; diff --git a/app.json b/app.json new file mode 100644 index 0000000..b1a56a4 --- /dev/null +++ b/app.json @@ -0,0 +1,6 @@ +{ + "expo": { + "scheme": "acme", + "web": { "bundler": "metro" } + } +} diff --git a/app/_layout.js b/app/_layout.js new file mode 100644 index 0000000..2897397 --- /dev/null +++ b/app/_layout.js @@ -0,0 +1 @@ +import { Tabs } from "expo-router"; export default Tabs; \ No newline at end of file diff --git a/appOLD2/_layout.js b/appOLD2/_layout.js new file mode 100644 index 0000000..31800e6 --- /dev/null +++ b/appOLD2/_layout.js @@ -0,0 +1,7 @@ +import { Tabs } from "expo-router"; + +export const unstable_settings = { + initialRouteName: "/testpage2", +}; + +export default Tabs; diff --git a/appOLD2/testpage1.js b/appOLD2/testpage1.js new file mode 100644 index 0000000..54a1fe6 --- /dev/null +++ b/appOLD2/testpage1.js @@ -0,0 +1,15 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const test1 = (props) => { + return( + <> + {/*componentzone start*/} + + + {/*componentzone end*/} + ) +}; + +export default test1; diff --git a/appOLD2/testpage2.js b/appOLD2/testpage2.js new file mode 100644 index 0000000..f824a6a --- /dev/null +++ b/appOLD2/testpage2.js @@ -0,0 +1,22 @@ +// importzone start +import StephanTestComponent from "stephan-test-component"; +// importzone end + +const dsfdsfdsfdsfdsfdsffsgdsfgf = (props) => { + return ( + <> + {/*componentzone start*/} + + {/*componentzone end*/} + + ); +}; + +export default dsfdsfdsfdsfdsfdsffsgdsfgf; diff --git a/appOLD2/testpage3/_layout.js b/appOLD2/testpage3/_layout.js new file mode 100644 index 0000000..2897397 --- /dev/null +++ b/appOLD2/testpage3/_layout.js @@ -0,0 +1 @@ +import { Tabs } from "expo-router"; export default Tabs; \ No newline at end of file diff --git a/appOLD2/testpage3/test.js b/appOLD2/testpage3/test.js new file mode 100644 index 0000000..54a1fe6 --- /dev/null +++ b/appOLD2/testpage3/test.js @@ -0,0 +1,15 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const test1 = (props) => { + return( + <> + {/*componentzone start*/} + + + {/*componentzone end*/} + ) +}; + +export default test1; diff --git a/appOLD2/testpage3/test2.js b/appOLD2/testpage3/test2.js new file mode 100644 index 0000000..54a1fe6 --- /dev/null +++ b/appOLD2/testpage3/test2.js @@ -0,0 +1,15 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const test1 = (props) => { + return( + <> + {/*componentzone start*/} + + + {/*componentzone end*/} + ) +}; + +export default test1; diff --git a/appOld/_layout.js b/appOld/_layout.js new file mode 100644 index 0000000..e2fe34a --- /dev/null +++ b/appOld/_layout.js @@ -0,0 +1,7 @@ +import { Stack } from "expo-router"; + +export default Stack; + +// import { Tabs } from "expo-router"; + +// export default Tabs; diff --git a/appOld/test2/_layout.js b/appOld/test2/_layout.js new file mode 100644 index 0000000..faa3363 --- /dev/null +++ b/appOld/test2/_layout.js @@ -0,0 +1,7 @@ +// import { Stack } from "expo-router"; + +// export default Stack; + +import { Tabs } from "expo-router"; + +export default Tabs; diff --git a/appOld/test2/nextversion.js b/appOld/test2/nextversion.js new file mode 100644 index 0000000..66bb613 --- /dev/null +++ b/appOld/test2/nextversion.js @@ -0,0 +1,15 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const test1 = (props) => { + return( + <> + {/*componentzone start*/} + + + {/*componentzone end*/} + ) +}; + +export default test1; diff --git a/appOld/test2/nextversion2.js b/appOld/test2/nextversion2.js new file mode 100644 index 0000000..3ee5817 --- /dev/null +++ b/appOld/test2/nextversion2.js @@ -0,0 +1,14 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const dsfdsfds = (props) => { + return( + <> + {/*componentzone start*/} + + {/*componentzone end*/} + ) +}; + +export default dsfdsfds; diff --git a/appOld/testpage1.js b/appOld/testpage1.js new file mode 100644 index 0000000..c383df0 --- /dev/null +++ b/appOld/testpage1.js @@ -0,0 +1,37 @@ +// importzone start +import StephanTestComponent from "stephan-test-component"; +import { Link } from "expo-router"; +import { View, Text } from "react-native"; +// importzone end + +const test1 = (props) => { + return ( + <> + + {/*componentzone start*/} + + + + Navigate to nested route + + {/*componentzone end*/} + + + ); +}; + +export default test1; diff --git a/appOld/testpage2.js b/appOld/testpage2.js new file mode 100644 index 0000000..3ee5817 --- /dev/null +++ b/appOld/testpage2.js @@ -0,0 +1,14 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const dsfdsfds = (props) => { + return( + <> + {/*componentzone start*/} + + {/*componentzone end*/} + ) +}; + +export default dsfdsfds; diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..7011966 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,11 @@ +module.exports = function (api) { + api.cache(true); + return { + presets: ["babel-preset-expo"], + plugins: [ + "@babel/plugin-proposal-export-namespace-from", + "react-native-reanimated/plugin", + require.resolve("expo-router/babel"), + ], + }; +}; diff --git a/index.js b/index.js new file mode 100644 index 0000000..4a444a7 --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +import "@bacons/expo-metro-runtime"; +import "expo-router/entry"; diff --git a/package.json b/package.json new file mode 100644 index 0000000..4bddb18 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "scripts": { + "start": "expo start", + "android": "expo start --android", + "ios": "expo start --ios", + "web": "expo start --web" + }, + "dependencies": { + "expo": "~47.0.3", + "expo-constants": "~14.0.2", + "expo-linking": "~3.2.3", + "expo-router": "^0.0.40", + "expo-splash-screen": "~0.17.4", + "expo-status-bar": "~1.4.2", + "layout-test-component": "^1.0.1", + "react": "18.1.0", + "react-dom": "18.1.0", + "react-native": "0.70.5", + "react-native-gesture-handler": "~2.8.0", + "react-native-reanimated": "~2.12.0", + "react-native-safe-area-context": "4.4.1", + "react-native-screens": "~3.18.0", + "react-native-web": "~0.18.7", + "stephan-test-component": "^1.0.12", + "zustand": "^4.2.0" + }, + "devDependencies": { + "@babel/core": "^7.19.3", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9" + }, + "resolutions": { + "metro": "^0.73.1", + "metro-resolver": "^0.73.1" + }, + "overrides": { + "metro": "^0.73.1", + "metro-resolver": "^0.73.1" + }, + "name": "appdevelopmentkitprototype", + "version": "1.0.0" +} diff --git a/testapp/testpage1.js b/testapp/testpage1.js new file mode 100644 index 0000000..6e1b4f2 --- /dev/null +++ b/testapp/testpage1.js @@ -0,0 +1,32 @@ +// importzone start +import StephanTestComponent from "stephan-test-component"; +import { Link } from "expo-router"; +// importzone end + +const test1 = (props) => { + return ( + <> + {/*componentzone start*/} + + + Navigate to nested route + {/*componentzone end*/} + + ); +}; + +export default test1; diff --git a/testapp/testpage2.js b/testapp/testpage2.js new file mode 100644 index 0000000..3ee5817 --- /dev/null +++ b/testapp/testpage2.js @@ -0,0 +1,14 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const dsfdsfds = (props) => { + return( + <> + {/*componentzone start*/} + + {/*componentzone end*/} + ) +}; + +export default dsfdsfds; diff --git a/testapp/testpage3/_layout.js b/testapp/testpage3/_layout.js new file mode 100644 index 0000000..3bf7879 --- /dev/null +++ b/testapp/testpage3/_layout.js @@ -0,0 +1,2 @@ +import { Tabs } from "expo-router"; +export default Tabs; diff --git a/testapp/testpage3/test.js b/testapp/testpage3/test.js new file mode 100644 index 0000000..66bb613 --- /dev/null +++ b/testapp/testpage3/test.js @@ -0,0 +1,15 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const test1 = (props) => { + return( + <> + {/*componentzone start*/} + + + {/*componentzone end*/} + ) +}; + +export default test1; diff --git a/testapp/testpage3/test2.js b/testapp/testpage3/test2.js new file mode 100644 index 0000000..66bb613 --- /dev/null +++ b/testapp/testpage3/test2.js @@ -0,0 +1,15 @@ +// importzone start +import StephanTestComponent from "stephan-test-component" +// importzone end + +const test1 = (props) => { + return( + <> + {/*componentzone start*/} + + + {/*componentzone end*/} + ) +}; + +export default test1;