Loading...
Loading...
Automates creation of MobX State Tree stores following Fitness Tracker App patterns for domain models, collections, and root store integration. Use when creating new MST stores, models, or extending existing store functionality with proper TypeScript typing, actions, views, and integration patterns.
npx skill4agent add planeinabottle/fitnessmobileapp mobx-state-tree-store-builderExerciseModelUserModeltypes.model("Name", { ... }).views(...).actions(...)ExerciseStoreStatsStoretypes.model("StoreName", { collection: types.map(Model) }).views(...).actions(...)UserStoreUiStoretypes.model("StoreName", { ... }).views(...).actions(...)export const RootStoreModel = types.model("RootStore", {
// Add new store here
newStore: types.optional(NewStoreModel, {}),
// ... existing stores
})IStoreNameIStoreNameSnapshotInIStoreNameSnapshotOut.views((self) => ({
get computedProperty() {
return self.someData * 2
},
}))getRoot<IRootStore>(self).actions((self) => ({
someAction() {
const rootStore = getRoot<IRootStore>(self)
rootStore.otherStore.doSomething()
},
}))flowimport { flow } from "mobx-state-tree"
.actions((self) => ({
asyncAction: flow(function* () {
try {
// async operations
yield someAsyncCall()
} catch (error) {
// error handling
}
}),
}))app/models/ModelName.tsStoreName.tsRootStore.tsapp/models/__tests__/