react-native-screens

Native navigation container primitives that make React Native screens render faster and use less memory.

Library
npm
v4.30.0
3,742 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
96 /100 Excellent
Development Activity 100
Maintenance 100
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 90
Code Quality 82
Innovation 85
Learning Curve 78

react-native-screens exposes the platform’s native navigation container primitives to React Native, so each screen in your app is backed by a real native view (UIViewController on iOS, Fragment on Android) instead of a plain JavaScript-managed View. This lets the operating system take over view lifecycle, memory management, and transition animations, delivering smoother navigation and lower memory usage.

It is not a standalone navigation library but the low-level foundation that popular libraries like react-navigation and Expo build on. Once installed, screen optimizations are enabled automatically, and advanced components such as native stacks, search bars, and full-window overlays become available across iOS, Android, tvOS, visionOS, Windows, and Web.

What You Get

  • Native-backed screen components (Screen, ScreenStack, ScreenContainer) that replace JavaScript-managed Views with real native containers
  • A native stack implementation with platform-standard headers, back gestures, and transition animations
  • Extra native building blocks such as SearchBar, FullWindowOverlay, and form-sheet/modal presentation
  • Automatic memory optimization that detaches off-screen views via react-freeze
  • Broad platform coverage: iOS, Android, tvOS, visionOS, Windows, and Web

Common Use Cases

  • Powering react-navigation or Expo Router so stack, tab, and drawer navigators use native screens
  • Adopting a native stack navigator for platform-authentic push/pop transitions and headers
  • Reducing memory footprint in apps with deep navigation trees by freezing off-screen screens
  • Adding native iOS search bars or full-window overlays to navigation headers

Under The Hood

Architecture

The library is a thin TypeScript surface (src/index.tsx re-exporting components from src/components/) sitting on top of a substantial native implementation. Each JS component like Screen.tsx or ScreenStack.tsx renders a codegen-generated Fabric native component; src/fabric/NativeScreensModule is imported for its side effect of registering the TurboModule. On the native side, iOS is written in Objective-C++/Swift under ios/ (e.g. RNSScreenView, RNSScreenStackView), Android in Kotlin under android/src/main/java/com/swmansion/rnscreens (Fragment-based screen restoration, custom toolbars, bottom sheets), and shared logic in C++ under cpp/. The codegenConfig in package.json declares dozens of native component specs that React Native’s codegen turns into the Fabric bindings the JS layer talks to.

Tech Stack

Written in TypeScript with only two runtime JS dependencies — react-freeze (to unmount off-screen subtrees) and warn-once. React and react-native are peer dependencies. Native code spans Kotlin, Swift/Objective-C++, and C++, built through the React Native Fabric renderer and codegen pipeline, with a CocoaPods podspec (RNScreens.podspec) and Gradle for distribution. Tooling includes Jest, ESLint, Prettier, clang-format, swift-format, and Husky git hooks.

Code Quality

The codebase is fully typed and platform-aware, with dedicated .web.tsx, .windows.tsx, and native variants per component signalling careful cross-platform separation. Linting and formatting are enforced across every language layer (JS, Android, Swift, C++) via separate scripts and Husky pre-commit hooks, and an AGENTS.md/CLAUDE.md documents contributor conventions. A test:unit Jest script exists, though automated coverage is light relative to the native surface — most verification happens through the extensive example apps (apps/, FabricExample/, TVOSExample/) rather than unit tests.

API Design

The public API is intentionally low-level, exporting native primitives (Screen, ScreenStack, ScreenContainer, SearchBar, FullWindowOverlay) plus toggles like enableScreens and enableFreeze. Most app developers never touch it directly — it is consumed transitively through react-navigation — so ergonomics favor library authors. For direct users, installation is largely automatic via auto-linking, though Android requires a documented MainActivity override to avoid state-restoration crashes, and the fast-moving version-to-react-native compatibility matrix demands attention.

Used by 25 apps in this directory

Python
62%
Apache 2.0

Polar

Developer Tools · Ecommerce · Invoicing Finance

10,410

Open source payments infrastructure that turns software into a business — subscriptions, usage-based billing, digital products, and merchant-of-record compliance in one platform.

View details
90
Repo Health
82
Technical
66
Dependency
Built with
Python 62%
TypeScript 31%
Updated 6 days ago
TypeScript
96%
Apache 2.0

rakazo

AI Agents · AI Assistants

5,488

An open-source platform for persistent AI teammates that own their own conversations, memory, routines, and computers — self-hosted, model-agnostic, and available on web, desktop, and mobile.

View details
82
Repo Health
91
Technical
70
Dependency
Built with
TypeScript 96%
Updated 6 days ago
Rust
79%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,292

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
84
Repo Health
84
Technical
63
Dependency
Built with
Rust 79%
TypeScript 18%
Updated 2 weeks ago
TypeScript
92%
Other

Suna

AI Agents

20,306

Turn your company into a git repo — one config, one command center, a workforce of AI agents that runs the real work around the clock.

View details
90
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 92%
Updated 5 days ago
TypeScript
72%
Apache 2.0

Supabase

Authentication · Databases · Developer Tools

113,827

The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.

View details
90
Repo Health
91
Technical
62
Dependency
Built with
TypeScript 72%
MDX 26%
Updated 5 days ago
TypeScript
85%
Apache 2.0

superset

AI Code Assistants · AI Development

15,503

Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.

View details
86
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 85%
Updated 5 days ago
TypeScript
98%
Apache 2.0

Tianji

Analytics · Monitoring

3,119

Replace Google Analytics, UptimeKuma, and Prometheus with one self-hosted platform that tracks websites, monitors uptime, and reports server health.

View details
86
Repo Health
76
Technical
64
Dependency
Built with
TypeScript 98%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers