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.
We can help you move
it forward!
At Callstack, we work with companies big and small, pushing React Native everyday.
React Native Performance Optimization
Improve React Native apps speed and efficiency through targeted performance enhancements.
Code Sharing
Implement effective code-sharing strategies across all platforms to accelerate shipping and reduce code duplication.
Mobile App Development
Launch on both Android and iOS with single codebase, keeping high-performance and platform-specific UX.
React Native Development
Hire expert React Native engineers to build, scale, or improve your app — from day one to production.

React Native Performance Optimization
Improve React Native apps speed and efficiency through targeted performance enhancements.
Quality Assurance
Combine automated and manual testing with CI/CD integration to catch issues early and deliver reliable React Native releases.
Scalability Engineering
Design and validate React Native architectures that scale—supporting high traffic, modular teams, and long-term performance.
Code Sharing
Implement effective code-sharing strategies across all platforms to accelerate shipping and reduce code duplication.