Menu

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

DEV Community: reactnative·Fouzia Naaz·6 months ago
#89RjjKRD
#dev#feature#every#mvvm#react
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.…

Continue reading — create a free account

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