What problem does it solve?
Guides Claude to refactor Vaadin 25 Flow views into small, reusable components to improve maintainability, reduce complexity, and enable reuse across views. It targets views that grow beyond ~200 lines, contain cohesive groups, or display repeated UI patterns.
Core Features & Use Cases
- Emphasizes using Composite<T> as the default base to encapsulate a view section and expose a clean, intent-based API.
- Explains when to extend an existing component vs. preferring composition, keeping the public API focused and predictable.
- Provides an extraction workflow: identify cohesive groups, define boundaries, extract into focused components, and wire them into the parent view.
- Describes communication patterns between components: Parent→Child via direct method calls; Child→Parent via typed events.
- Covers wrapper/slot patterns for layout components with named areas (e.g., a PageHeader with title and actions).
- Defines API design principles (clear, intent-based methods like setTitle, setValue) and lifecycle considerations (onAttach/onDetach).
- Highlights best practices for maintainable, reusable components and safe composition.
Quick Start
Start by identifying a monolithic view and extract a focused component using Composite<T>, then wire it into the parent view and test in isolation.