React Native MVVM Feature Generator
Scaffold scalable React Native features using the MVVM pattern with a single command.
What it generates
Running RN MVVM: Create Feature with the name Profile produces:
src/features/Profile/
├── ProfileView.tsx
├── useProfileViewModel.ts
├── profileService.ts
├── profileTypes.ts
└── index.ts
Usage
Option 1 — Command Palette
Cmd+Shift+P
- Run RN MVVM: Create Feature
- Enter a feature name (e.g.
Profile, UserSettings, Checkout)
- Confirm the base folder (defaults to
src/features)
- Pick TypeScript or JavaScript
Option 2 — Right-click a folder
Right-click any folder in the Explorer → RN MVVM: Create Feature in This Folder
Settings
| Setting |
Default |
Description |
rnMvvm.language |
"typescript" |
Default language for generated files |
rnMvvm.defaultBaseFolder |
"src/features" |
Path where features are created |
rnMvvm.useIndexFile |
true |
Generate a barrel index.ts |
rnMvvm.styleStrategy |
"stylesheet" |
View styling: stylesheet, inline, or none |
rnMvvm.overwritePolicy |
"prompt" |
What to do if files exist: prompt, skip, or overwrite |
Commands
| Command |
ID |
| RN MVVM: Create Feature |
rnMvvm.createFeature |
| RN MVVM: Create Feature in This Folder |
rnMvvm.createFeatureHere |
Troubleshooting
Nothing happens when I run the command.
Open the React Native MVVM output channel (View → Output) — every action is logged there.
Folder already exists error.
Change rnMvvm.overwritePolicy to overwrite or skip in your settings.
License
MIT
| |