Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Modular architecture is a way of organizing code that divides an application into independent modules or “features”, each with its own logic, screens, state, and components.
The goal of this project is for you to learn how to structure a React Native CLI app with TypeScript following this approach, making it more scalable, maintainable, and easier to understand.
Clone the movie catalog project you have already created. This project will serve as a starting point to practice modularization.
🖥️ Initial Steps
1cd react-native-movie-catalogue 2npm install
1cd ios && pod install && cd ..
1npm run android 2npm run ios
💡 Important: Remember to save and upload your code to GitHub by creating a new repository, updating the remote (
git remote set-url origin <your new url>), and pushing the code to your new repository using theadd,commit, andpushcommands from the git terminal.
The goal is to modularize the movie catalog app, migrating the Movies and Categories sections.
1src/ 2 features/ 3 movies/{screens,components,store} 4 categories/{screens,store} 5 shared/{ui,lib,types} 6 navigation/{StackNavigator.tsx, feature-registry.ts}
HomeScreen → features/movies/screens/MoviesListScreen.tsxMovieDetailScreen → features/movies/screens/MovieDetailScreen.tsxCategoriesScreen → features/categories/screens/CategoriesScreen.tsxCategoryMoviesScreen → features/categories/screens/CategoryMoviesScreen.tsx@shared:
shared/lib/movies.ts with an array movies and helper getMoviesByCategory.shared/ui/Grid.tsx for spacing content.shared/types/index.ts with the Movie type.features/movies/store/movies.store.ts with favorites, toggle, isFav.features/categories/store/categories.store.ts with active, setActive.index.ts file in each feature as an entry point (features/<x>/index.ts) and define routes: moviesRoutes and categoriesRoutes.This file will act as the module's entry point, re-exporting screens, stores, or components that should be accessible from outside and grouping the feature's routes. Everything else inside the folder is considered internal to the module.
navigation/feature-registry.ts and mount them in StackNavigator.tsx.tsconfig.json and babel.config.js for @/*, @features/*, @shared/*.@shared/*.features/ and shared/.Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand
Difficulty
intermediate
Average duration
1 hrs
Technologies
Typescript
react native
React Navigation
zustand