I Built a File-Based Router for React Native
I Built a File-Based Router for React Native
A deep dive into building a file-based router for React Native using Metro’s hidden APIs, dynamic routing, loading states, and smart hacks included.
I Built a File-Based Router for React Native
What happens when a web dev goes down the React Native rabbit hole with a weekend hack project? You get a custom file-based router built from scratch, with suspense and error handling, and some clever use of Metro internals.
In this talk from the React Universe Meetup in Wrocław (April 2024), Szymon Chmal, Senior Software Engineer at Callstack, walks through how curiosity led him to explore file routing in React Native. Along the way, he uncovered undocumented Metro APIs, tackled dynamic imports, and discovered ways to replicate familiar patterns from Next.js, all with a surprisingly lean setup.
Expect some laughs, real talk about dev pain points, and a ton of practical insights.
I Built a File-Based Router for React Native
A deep dive into building a file-based router for React Native using Metro’s hidden APIs, dynamic routing, loading states, and smart hacks included.

Learn more about React Native
Here's everything we published recently on this topic.
React Native Performance Optimization
Improve React Native apps speed and efficiency through targeted performance enhancements.
C++ Library Integration for React Native
Wrap existing C-compatible libraries for React Native with type-safe JavaScript APIs.
Shared Native Core for Cross-Platform Apps
Implement business logic once in C++ or Rust and run it across mobile, web, desktop, and TV.
Custom High-Performance Renderers
Build custom-rendered screens with WebGPU, Skia, or Filament for 60fps, 3D, and pixel-perfect UX.
























