{"id":19499686,"url":"https://github.com/apsl/react-native-navigator-wrapper","last_synced_at":"2025-04-25T22:34:19.190Z","repository":{"id":57338617,"uuid":"45603480","full_name":"APSL/react-native-navigator-wrapper","owner":"APSL","description":"A React Native Navigator component wrapper that implements nested navigators for both push and modal transitions","archived":false,"fork":false,"pushed_at":"2017-10-20T13:31:06.000Z","size":72,"stargazers_count":30,"open_issues_count":7,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-31T17:36:32.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/APSL.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}},"created_at":"2015-11-05T10:13:32.000Z","updated_at":"2023-09-08T17:03:19.000Z","dependencies_parsed_at":"2022-09-07T10:12:41.606Z","dependency_job_id":null,"html_url":"https://github.com/APSL/react-native-navigator-wrapper","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-navigator-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-navigator-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-navigator-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APSL%2Freact-native-navigator-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/APSL","download_url":"https://codeload.github.com/APSL/react-native-navigator-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224019605,"owners_count":17242177,"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-10T22:05:48.657Z","updated_at":"2024-11-10T22:05:49.284Z","avatar_url":"https://github.com/APSL.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-navigator-wrapper\n\nA React Native Navigator component wrapper that implements nested navigators for\nboth push and modal transitions.\n\n## ⚠️ DEPRECATED ⚠️\nThis component has been deprecated. Use it at your own risk.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/wiki/APSL/react-native-navigator-wrapper/nav.gif\" alt=\"Wrapper example\" width=\"400\"\u003e\n\u003c/p\u003e\n\n## Installation\nYou can install this component through ``npm``:\n\n```shell\nnpm i react-native-navigator-wrapper --save\n```\n\nConfigure the awesome\n[``react-native-vector-icons``](https://github.com/oblador/react-native-vector-icons#installation)\nfrom Joel Oblador to display the back button icons. Remember to include the\n``Ionicons.ttf`` font in your project. All the components of the library are\nwritten in ES6/ES7 style.\n\n## Motivation\nThis library implements the nested ``Navigator`` strategy to let the developer\nto use both push-like transitions and modal transitions that can also handle\npush navigation inside them. Think about a login/signup process. You can let the\nuser to browse your app and then present a modal when they want to register.\nOnce the modal is open, you can provide push navigation between signup or register\nscreens. This is what tries to solve this component.\n\nTake this pseudo-jsx code as an example:\n\n```js\n\u003cNavigator\n  renderScene={(route, navigator) =\u003e {\n    if (route.id === 'innerNavigator') {\n      // This navigator uses push-like transitions\n      return \u003cNavigator /\u003e\n    }\n    // This navigator also uses push-like transitions, but it is opened using\n    // FloatFromBottom scene config\n    return \u003cNavigator /\u003e\n  }}\n/\u003e\n```\n\nThe parent navigator will push new components using ``FloatFromBottom``. Both\ninner navigators will use ``FloatFromRight``, but the inner navigator will keep\nthe default navigation history and the other navigator is going to be used when\npresenting a modal component. With this you can have push navigation inside a\nmodal component.\n\n## Usage\nThis library can be used in several ways. It's composed from a couple of different\ncomponents that interact with each other. In short, it has a navigation bar that\nmimics the iOS and Android navigation bar and two navigation wrappers.\n\n### Nested navigation with ``TopNavigatorWrapper``\nYou can use ``TopNavigatorWrapper`` component to bring the nested navigator\nstrategy just importing the component and wrapping whatever you want to render\ninside it:\n\n```js\nimport React from 'react'\nimport { TopNavigatorWrapper } from 'react-native-navigator-wrapper'\nimport MyComponent from './MyComponent'\n\nclass MyApp extends React.Component {\n  render () {\n    return (\n      \u003cTopNavigatorWrapper modalStyle={{backgroundColor: '#090909'}}\u003e\n        \u003cMyComponent /\u003e\n      \u003c/TopNavigatorWrapper\u003e\n    )\n  }\n}\n```\n\nYou component ``MyComponent`` will have a **topNavigator** prop. It will let you to push new components in a modal-style, opening from bottom to top.\n\n### Navigation with ``NavigatorWrapper``\nIf you just want to use the navigation bar inside a navigator, use the\n``NavigatorWrapper`` component:\n\n```js\nimport React from 'react'\nimport { NavigatorWrapper } from 'react-native-navigator-wrapper'\n\nclass MyComponent extends React.Component {\n  render () {\n    return (\n      \u003cNavigatorWrapper\n        initialRoute={{\n          component: Component,\n          title: 'Title'\n        }}\n      /\u003e\n    )\n  }\n}\n```\n\nEvery time you push a component that's inside the ``NavigatorWrapper`` component\nyou will have a **navigator** prop, just like the top navigation option before,\nthat will let you to keep pushing components in the stack.\n\n### Custom ``routeMapper``\nThe React Native ``Navigator.NavigatorBar`` component has an object called\n``routeMapper`` that configures the three components that can be displayed\ninside the navigation bar: ``LeftButton``, ``RightButton`` and ``Title``.\nThis library auto-generates a default route mapper object that displays an iOS \u0026 Android style back button, a title and accepts a right element to render.\n\nIt also provides functions to generate each of the route mapper components so\nyou can build a completely custom navigation bar for each ``NavigatorWrapper``.\nSee the source code for more information.\n\n## 🚧 Roadmap\n\n- [ ] Handle several hardware back button actions with multiple navigators (Android).\n\n## License\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsl%2Freact-native-navigator-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsl%2Freact-native-navigator-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsl%2Freact-native-navigator-wrapper/lists"}