uno-mvux-records

Generate IKeyEquatable implementations for immutable MVUX records with key equality.

9|1|Updated Dec 10, 2024
One-click install
npx skills add https://github.com/unoplatform/studio --skill uno-mvux-records
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uno-mvux-records
Source: https://github.com/unoplatform/studio/tree/main/plugins/uno-platform-studio/skills/uno-mvux-records
Command: npx skills add https://github.com/unoplatform/studio --skill uno-mvux-records

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MVUX relies on immutable records with correct key equality to reliably track items in UI lists and state, preventing flicker and mis-identification.

Core Features & Use Cases

  • Auto-generation of IKeyEquatable for partial records that have an Id or Key property.
  • Support for explicit keys via [Key] attributes when names differ or for composite keys.
  • Assembly-level defaults to configure key property discovery and safe defaults for MVUX models.

Use cases: modeling data entities in MVUX, ensuring stable list rendering, and correct messaging/entity matching.

Quick Start

Define a partial record Person with Id as the key and demonstrate updating a field using with to create a modified copy.

Frequently Asked Questions about uno-mvux-records

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do my MVUX list items flicker or mis-identify during updates?

MVUX list flicker and mis-identification occur when immutable records lack correct key equality. Enforcing IKeyEquatable ensures stable list rendering by precisely tracking item identity across updates.

How do I configure key equality for immutable records in MVUX?

Configure key equality by defining partial records with an Id or Key property to auto-generate IKeyEquatable, or apply explicit [Key] attributes to specify custom or composite key properties for MVUX data models.

Can I use composite keys or custom property names for MVUX record matching?

Yes, you can use composite keys or custom property names by applying explicit [Key] attributes. This overrides default Id or Key discovery to ensure precise entity matching in MVUX messaging and state scenarios.

Do I need to manually implement IKeyEquatable for my MVUX data models?

No, manual implementation is unnecessary. The system auto-generates IKeyEquatable for partial records containing an Id or Key property, and supports assembly-level defaults to configure key property discovery across MVUX models.

How do I update an immutable MVUX record without losing key equality?

Update immutable MVUX records using with-expressions to create modified copies. This preserves key equality and IKeyEquatable implementation, ensuring the updated item maintains stable identity within UI list rendering.

What are the limitations of using assembly-level defaults for MVUX record keys?

Assembly-level defaults configure key property discovery and safe defaults for MVUX models, but require partial records with recognizable Id or Key properties, or explicit [Key] attributes, to correctly enforce immutable record key equality.