{"id":16635861,"url":"https://github.com/ythecombinator/react-native-web-monorepo-navigation","last_synced_at":"2025-06-26T20:36:01.456Z","repository":{"id":39265339,"uuid":"230191699","full_name":"ythecombinator/react-native-web-monorepo-navigation","owner":"ythecombinator","description":"⚛️ An opinionated universal navigation strategy for codebases containing both React \u0026 React Native.","archived":false,"fork":false,"pushed_at":"2022-10-20T20:30:31.000Z","size":6969,"stargazers_count":26,"open_issues_count":26,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T02:44:24.552Z","etag":null,"topics":["monorepo","react","react-native","react-navigation","react-router-dom","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ythecombinator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-26T03:57:07.000Z","updated_at":"2024-01-06T18:54:40.000Z","dependencies_parsed_at":"2022-08-28T00:23:25.361Z","dependency_job_id":null,"html_url":"https://github.com/ythecombinator/react-native-web-monorepo-navigation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ythecombinator%2Freact-native-web-monorepo-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ythecombinator%2Freact-native-web-monorepo-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ythecombinator%2Freact-native-web-monorepo-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ythecombinator%2Freact-native-web-monorepo-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ythecombinator","download_url":"https://codeload.github.com/ythecombinator/react-native-web-monorepo-navigation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822705,"owners_count":20516153,"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":["monorepo","react","react-native","react-navigation","react-router-dom","typescript"],"created_at":"2024-10-12T06:05:03.943Z","updated_at":"2025-03-21T15:31:43.952Z","avatar_url":"https://github.com/ythecombinator.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Navigation on React Native [Web]\n\nThis is the source code from [this blog post](https://dev.to/ythecombinator/driving-towards-a-universal-navigation-strategy-in-react-j60).\n\n![cover](cover.png)\n\n### Table of Contents\n\n- [How to run](#how-to-run)\n- [API](#api)\n- [Roadmap](#roadmap)\n\n### How to run\n\n_Requirements: [React Native](https://facebook.github.io/react-native/docs/getting-started.html#native) (last tested on react-native@0.61)_\n\n- `$ git clone git@github.com:ythecombinator/react-native-web-monorepo-navigation.git`\n- `$ cd react-native-web-monorepo-navigation`\n- `$ yarn`\n- `$ cd packages/mobile/ios`\n- `$ pod install`\n- `$ cd -`\n- `$ yarn workspace web start`\n- `$ yarn workspace mobile start`\n- Run the project\n  - [iOS] Via Xcode\n    - `yarn xcode` (open the project on Xcode)\n    - Press the Run button\n  - [Android] Via Android Studio\n    - `yarn studio` (open the project on Android Studio)\n    - Press the Run button\n  - Via CLI\n    - _You may need to launch your device emulator before the next command_\n    - `$ yarn android` or `$ yarn ios`\n\n### [API](#api)\n\n#### `useNavigation()`\n\n`useNavigation` is a hook which gives access to the `navigation` object. It includes:\n\n- `navigate`: Go to another route\n- `replace`: Replace the current route with a new one\n- `goBack`: Close active route and move back in the stack\n\n#### `useRoute()`\n\n`useRoute` is a hook which gives access to the `route` object. It includes:\n\n- `name`: Name of the route. Defined in navigator component hierarchy\n- `params`: Set of params which is defined while navigating – e.g. `navigate('Twitter', { user: 'Dan Abramov' })`\n\n#### `\u003cLink /\u003e`\n\nProvides declarative, accessible navigation around your application. It has the following props:\n\n- `path`: A string representing the path to link to\n- `params`: An object of key/value pairs of route parameters\n\n### Roadmap\n\n#### API\n\n- [x] `useRoute` hook\n- [x] `useNavigation` hook\n- [x] `Link` componentt\n- [ ] `Redirect` component\n\n#### Miscellaneous\n\n- [ ] Move API to a library that can be installed as an npm package\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fythecombinator%2Freact-native-web-monorepo-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fythecombinator%2Freact-native-web-monorepo-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fythecombinator%2Freact-native-web-monorepo-navigation/lists"}