Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

React Native Architecture: 8 Folder Structures for Scalable Apps

A team-lead's breakdown of 8 real React Native project architectures — what each one actually solves, where the "Domain-Driven" and "Micro-Frontend" labels get misused, and how to pick one without over-engineering an MVP. The house-building analogy When you build a house, the labor that lays the bricks gets paid well. The architect who drew the blueprint gets paid more — because the architect…

Building a robust React Native application requires careful consideration of the project's folder structure. The right structure can accommodate future features and additional engineers, while a poorly chosen structure may cause the codebase to collapse under its own weight. Here are eight real-world React Native project architectures, their purpose, and how to choose the right one without over-engineering an MVP.

1. Flat Structure: Suitable for prototypes, MVPs, and single-screen proof of concepts, this structure places all files within a single `src/` directory. However, it becomes unmanageable as the number of files grows, making it difficult to navigate and find relevant code.

2. Feature-Based Structure: The most common structure in production React Native apps, this approach organizes code by product area (e.g., auth, profile, feed). Each feature owns its components, screens, and API services, allowing for isolated development and a streamlined merge process. To enforce isolation, use lint rules to prevent cross-imports between feature folders.

3. Layered Structure: Grouping code by technical role (components, screens, services, utils, and hooks) provides separation of concerns. This structure works well for small to medium-sized apps where the team reasons by technical layers rather than product features. However, without enforcement, components/ and screens/ can become cluttered dumping grounds.

4. Domain-Based Structure: This approach groups code by business capability instead of UI feature, often aligning with an actual team structure. For large-scale products with distinct business capabilities and multiple sub-teams, this folder structure mirrors the org chart, allowing each domain to own its end-to-end functionality. However, it's essential to ensure that domain boundaries are correctly established to avoid cross-team friction.

5. Atomic Design Structure: Based on Brad Frost's Atomic Design methodology, this structure focuses on UI component architecture rather than app architecture. Components are divided into atoms, molecules, organisms, templates, and pages. This structure is best suited for teams building a shared UI/component library that can be consumed by multiple apps.

6. Duck Structure: Commonly used in Redux-heavy applications, Duck Structure organizes Redux-related code into separate files for actions, reducer, and types within a `ducks/` directory. While this structure works well for managing application state, it may not align as effectively with feature isolation and team ownership as other structures.

When choosing the right folder structure, consider the size of your team, the complexity of your application, and the need for separation of concerns. Remember, the goal is not to over-engineer an MVP but to set a solid foundation for future growth and scalability.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

var in JavaScript

var is one of the ways to create a variable in JavaScript. A variable is a place to store a value, like a name or a number. var is mostly seen in old JavaScript code, written before 2015.

  • "var" is a common variable declaration method in JavaScript.
  • Variables created with "var" can be modified and re-declared.
  • "var" variables are hoisted to the top of their containing function.

i18n sin gettext: traducciones en JSON con claves de punto

Quieres que tu app hable español e inglés. Buscas cómo, y el ecosistema te empuja a gettext o Babel: ficheros .po , un paso de compilación a .mo , herramientas de extracción. Potente, sí.

  • dotkey-i18n is a Python-only i18n solution with no dependencies
  • JSON format for translations, easy to edit by anyone
  • Key notation with point, e.g. t(login.submit) navigates JSON

FetchQuest: Spec-Driven Dog Battling on Solana Devnet

This is a submission for Weekend Challenge: Dog Days Edition What I Built FetchQuest — a tiny dog-vs-raccoon battler. You generate a dog with random stats (Speed, Bark, Chomp) and a personality tag…

  • FetchQuest is a dog-vs-raccoon battler on Solana devnet
  • Players create dogs with random stats and personality
  • Spec-driven development guided project decisions

More from Sunday 16 August →