## easy-model 场景 Cookbook > [English Version / 英文版](./COOKBOOK.en.md) 本文以“场景配方”的形式,给出一些常见业务场景在 easy-model 下的实现思路与套路。示例均为伪代码级别,重点是模式而不是具体字段。 --- ## 1. 简单计数器(入门模板) ### 1.1 Model 设计 ```ts class CounterModel { count = 0; increment() { this.count += 1; } decrement() { this.count -= 1; } } ``` ### 1.2 组件使用 ```tsx function Counter() { const counter = useModel(CounterModel); return (