{"id":21877444,"url":"https://github.com/erabossid/react-navigation-for-mobile-app","last_synced_at":"2025-03-10T14:23:02.829Z","repository":{"id":166677000,"uuid":"377053373","full_name":"erabosscode/react-navigation-for-mobile-app","owner":"erabosscode","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-15T08:11:40.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T02:22:54.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erabosscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-15T06:03:05.000Z","updated_at":"2021-06-15T11:48:07.000Z","dependencies_parsed_at":"2023-06-01T14:15:23.076Z","dependency_job_id":null,"html_url":"https://github.com/erabosscode/react-navigation-for-mobile-app","commit_stats":null,"previous_names":["tradecoder/react-navigation-for-mobile-app","logixmaster/react-navigation-for-mobile-app","mydigita/react-navigation-for-mobile-app","erabossid/react-navigation-for-mobile-app","erabosstt/react-navigation-for-mobile-app","erabosscode/react-navigation-for-mobile-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-navigation-for-mobile-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-navigation-for-mobile-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-navigation-for-mobile-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-navigation-for-mobile-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erabosscode","download_url":"https://codeload.github.com/erabosscode/react-navigation-for-mobile-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242865012,"owners_count":20197819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T08:09:17.317Z","updated_at":"2025-03-10T14:23:02.801Z","avatar_url":"https://github.com/erabosscode.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-navigation-codes-for-mobile-app\n\n## Install React-Navigation\n```node\nnpm install @react-navigation/native\n```\n\n## Install dependencies (for expo app)\n```node\nexpo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view\n```\n\n## Install dependencies (with npm)\n```node\nnpm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view\n```\n\n## Install react-navigation/stack\n```node\nnpm install @react-navigation/stack\n```\n\n## Use React-Navigation to your app\n\n* Import \n```javascript\nimport 'react-native-gesture-handler';\n//the above line will be on the top\n//...\nimport { NavigationContainer } from '@react-navigation/native';\nimport { createStackNavigator } from '@react-navigation/stack';\n```\n\n## Create and use Stack navigator\n* Import your screen components like HomeScreen, LoginScreen, SignupScreen then use them  \n\n```javascript\nconst Stack = createStackNavigator();\n\nexport default function App(){\nreturn (\n    \u003cNavigationContainer\u003e\n      \u003cStack.Navigator initialRouteName=\"Home\"\u003e\n        \u003cStack.Screen name=\"Home\" component={HomeScreen} /\u003e\n        \u003cStack.Screen name=\"Login\" component={LoginScreen} /\u003e\n        \u003cStack.Screen name=\"Signup\" component={SignupScreen} /\u003e\n      \u003c/Stack.Navigator\u003e\n    \u003c/NavigationContainer\u003e\n  );\n}\n\n\n```\n\n## Move to another screen\n* Press a button to go to LoginScreen from HomeScreen\n```javascript\nexport default function HomeScreen({ navigation }) {\n  return (\n    \u003cView\u003e\n      \u003cText\u003eHome Screen\u003c/Text\u003e\n      \u003cButton title=\"Login\" onPress={() =\u003e navigation.navigate('Login')} /\u003e\n    \u003c/View\u003e\n  );\n}\n\n```\n\n## Go back to previous screen\n\n```javascript\n\u003cButton title=\"Go back\" onPress={() =\u003e navigation.goBack()} /\u003e\n```\n\n## Go back to the first screen\n```javascript\n\u003cButton title=\"Go back to first screen\" onPress={() =\u003e navigation.popToTop()} /\u003e\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferabossid%2Freact-navigation-for-mobile-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferabossid%2Freact-navigation-for-mobile-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferabossid%2Freact-navigation-for-mobile-app/lists"}