Menu

πŸ“°
0

I built a VS Code extension that scaffolds React Native MVVM features in one command

DEV Community: reactnativeΒ·Fouzia NaazΒ·about 1 month ago
#89RjjKRD
#dev#feature#every#mvvm#react#test
Reading 0:00
15s threshold

Every React Native developer knows this ritual. You need a new screen. So you open an existing feature folder, copy the files, rename them one by one, fix the broken imports, delete the leftover logic, and spend 15 minutes doing work that has nothing to do with what you actually wanted to build. I got tired of it. So I built a VS Code extension to fix it. What it does React Native MVVM Feature Generator scaffolds a complete MVVM feature folder with one command. You hit Cmd+Shift+P, type a name like Checkout, and get: src/features/Checkout/ β”œβ”€β”€ CheckoutView.tsx β”œβ”€β”€ useCheckoutViewModel.ts β”œβ”€β”€ checkoutService.ts β”œβ”€β”€ checkoutTypes.ts β”œβ”€β”€ CheckoutView.test.tsx β”œβ”€β”€ useCheckoutViewModel.test.ts └── index.ts Every file is pre-wired. The View imports the ViewModel. The ViewModel imports the Service. The Service imports the Types. Zero circular dependencies, zero manual setup. The problem it solves On any organised React Native project, every feature needs the same four files. The structure is always the same.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More