|
1 | 1 | --- |
2 | | -'@effector/model': patch |
3 | | -'@effector-model/core-experimental': minor |
4 | | -'@effector/model-react': patch |
| 2 | +'@effector/model': major |
| 3 | +'@effector-model/core-experimental': major |
| 4 | +'@effector/model-react': major |
5 | 5 | --- |
6 | 6 |
|
7 | | -Refactor internal types and lint fixes. |
8 | | -Add lens feature to core-experimental. |
| 7 | +# The Inevitable Architecture: Trait-Based Composition & Predictable Systems |
| 8 | + |
| 9 | +This major update introduces a paradigm shift in how models are composed and consumed, moving from rigid structures to a flexible, trait-based system. |
| 10 | + |
| 11 | +## Key Changes |
| 12 | + |
| 13 | +- **Trait-Based Model Composition**: Introduced the `model()` API with support for Facets (traits) and Variants (conditional logic). |
| 14 | +- **Deep Reactivity with Lenses**: New `Lens` concept and `select` API for type-safe, deep reactive access to model state. |
| 15 | +- **Predictable System Architecture**: |
| 16 | + - Hardened development loop with Vitest console interceptors. |
| 17 | + - Strict ESLint rules to prevent common pitfalls (e.g., passing Lenses to `useUnit`). |
| 18 | + - Enhanced runtime validation and API guardrails in `useLens` and `select`. |
| 19 | +- **New Experimental Package**: `@effector-model/core-experimental` houses the next-generation model system. |
| 20 | +- **Advanced Features**: |
| 21 | + - Multi-restaurant support and item grouping in the cart. |
| 22 | + - Union API for handling heterogeneous product types. |
| 23 | + - `serialize` utility for model snapshots. |
| 24 | +- **Refactorings**: Updated `@effector/model` and `@effector/model-react` to support the new Lens-based architecture and improved type safety. |
0 commit comments