{"id":26472611,"url":"https://github.com/jacquesikot/react-native-navigation-container","last_synced_at":"2026-04-11T19:04:53.932Z","repository":{"id":57338611,"uuid":"372661496","full_name":"jacquesikot/react-native-navigation-container","owner":"jacquesikot","description":"Enhanced Navigation Container for React Native","archived":false,"fork":false,"pushed_at":"2021-06-29T11:57:56.000Z","size":5064,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T18:52:24.220Z","etag":null,"topics":["assets","expo","fonts","load","navigation","react","react-native"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jacquesikot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-01T00:42:03.000Z","updated_at":"2021-06-29T11:56:17.000Z","dependencies_parsed_at":"2022-09-07T10:12:37.798Z","dependency_job_id":null,"html_url":"https://github.com/jacquesikot/react-native-navigation-container","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jacquesikot/react-native-navigation-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacquesikot%2Freact-native-navigation-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacquesikot%2Freact-native-navigation-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacquesikot%2Freact-native-navigation-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacquesikot%2Freact-native-navigation-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacquesikot","download_url":"https://codeload.github.com/jacquesikot/react-native-navigation-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacquesikot%2Freact-native-navigation-container/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269922917,"owners_count":24497003,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["assets","expo","fonts","load","navigation","react","react-native"],"created_at":"2025-03-19T21:35:12.612Z","updated_at":"2025-12-30T21:47:58.207Z","avatar_url":"https://github.com/jacquesikot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-navigation-container\n\n[![npm version](https://badge.fury.io/js/react-native-navigation-container.svg)](https://badge.fury.io/js/react-native-navigation-container)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n## Table of Contents\n\n- [About](#about)\n- [Usage](#usage)\n- [Contributing](./CONTRIBUTING.md)\n\n## About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nThe goal of `react-native-navigation-container` is to provide a convinient method to load static fonts and assets during the app splash screen and provide a development navigation that remains unchanged after app refresh.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/.github/images/withoutNavContainer.gif\" height=\"500\" /\u003e\n\u003cspan width='20px' /\u003e\n\u003cimg src=\"/.github/images/withNavContainer.gif\" height=\"500\" /\u003e\n\u003c/p\u003e\n\nFirst gif is without preloading assets using `NavigationContainer`. Second gif uses `NavigationContainer` to preload assets and it shows immediately after splash screen is done.\n\nIf you're interested in the implementations of the animations above visit this [link](https://github.com/jacquesikot/React-Native-Fashion-App)\n\n## Features\n\n- Load static images and fonts while splash screen is showing.\n- Maintain navigation state after app refresh while in development mode.\n\n## Setup\n\nThis library is available on npm, install it with: `npm i react-native-navigation-container` or `yarn add react-native-navigation-container`.\n\n## Usage \u003ca name = \"usage\"\u003e\u003c/a\u003e\n\nSince `react-native-navigation-container` is an extension of the original react navigation `NavigationContainer`, it works in a similar fashion as [react navigation - navigation container](https://reactnavigation.org/docs/navigation-container/).\n\n1. Import react-native-navigation-container:\n\n```javascript\nimport NavigationContainer from 'react-native-navigation-container';\n```\n\n2. Wrap root navigation with Navigation container:\n\n```javascript\nexport default function App() {\n  return (\n    \u003cNavigationContainer\u003e\n      \u003cRootNav /\u003e\n    \u003c/NavigationContainer\u003e\n  );\n}\n```\n\n3. Prepare fonts and assets to be loaded:\n\n```javascript\nconst fonts = {\n  'SofiaPro-Black': require('../../assets/fonts/SofiaProBlack.otf'),\n  'SofiaPro-BlackItalic': require('../../assets/fonts/SofiaProBlackItalic.otf'),\n};\n\nconst assets = [\n  require('../../assets/images/img1.png'),\n  require('../../assets/images/img2.png'),\n];\n```\n\n4. Add fonts and assets to navigation container:\n\n```javascript\nexport default function App() {\n  return (\n    \u003cNavigationContainer fonts={fonts} assets={assets}\u003e\n      \u003cRootNav /\u003e\n    \u003c/NavigationContainer\u003e\n  );\n}\n```\n\n5. Optionally set the `stickyNav` prop:\n\n```javascript\nexport default function App() {\n  return (\n    \u003cNavigationContainer fonts={fonts} assets={assets} stickyNav={true}\u003e\n      \u003cRootNav /\u003e\n    \u003c/NavigationContainer\u003e\n  );\n}\n```\n\n## A complete example\n\n```javascript\nimport React from 'react';\nimport NavigationContainer from 'react-native-navigation-container;\n\nimport { RootNav } from './src/navigation';\n\nexport default function App() {\n  return (\n    \u003cNavigationContainer fonts={fonts} assets={assets} stickyNav={true}\u003e\n        \u003cRootNav /\u003e\n    \u003c/NavigationContainer\u003e\n  );\n}\n```\n\n## Available props\n\n| Name      | type   | Description                                                     |\n| --------- | ------ | --------------------------------------------------------------- |\n| fonts     | object | Fonts to be loaded into app                                     |\n| assets    | array  | Static assets to be loaded into app                             |\n| stickyNav | bool   | Maintains navigation state after app refresh - only in dev mode |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacquesikot%2Freact-native-navigation-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacquesikot%2Freact-native-navigation-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacquesikot%2Freact-native-navigation-container/lists"}