소스 정보
- 저장소
- unoplatform/studio
- 최근 소스 활동
- 2026년 6월 9일 19:39
- 감지된 SKILL.md 언어
- 영어
- 스타
- 10
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/unoplatform/studio --skill uno-mvux-state-basics명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | uno-mvux-state-basics |
| description | Create and use IState<T> for mutable reactive data in MVUX. |
| when_to_use | Use when implementing two-way data binding (e.g., TextBox, Slider, ToggleSwitch), accepting and storing user input, maintaining editable application state, programmatically updating a value from a command or service call, or understanding the difference between `IFeed<T>` (read-only) and `IState<T>` (read/write). |
| metadata | {"author":"uno-platform","version":"2.4","category":"mvux"} |
Docs lookup: call
uno_platform_docs_search(...)first, thenuno_platform_docs_fetch(sourcePath="…")using thesourcePathfield from a result (a relative.mdpath; add the result'sanchorfor a section). Never pass a URL, a.htmllink, or a hand-built path.
Search for and fetch the state documentation:
uno_platform_docs_search("MVUX State IState mutable two-way binding")
Primary documentation page:
external/uno.extensions/doc/Reference/Reactive/state.mdFetch the full reference:
uno_platform_docs_fetch(sourcePath="external/uno.extensions/doc/Reference/Reactive/state.md")
From the fetched docs, the key factory methods on the State and State<T> classes:
State<T>.Empty(this) — starts with no valueState<T>.Value(this, initialValue) — starts with a sync valueState.Async(this, asyncFunc) — initial value from async sourceState.FromFeed(this, feed) — wraps a feed as mutable stateThe state reference page covers UpdateAsync, SetAsync, and ForEach for subscribing to changes. Focus on the "Update: How to update a state" section.
The state reference page includes a "Binding the View to a State" section showing how XAML two-way binding works automatically with generated ViewModels.
If the user needs commands that interact with states:
uno_platform_docs_search("MVUX commands state update async method")
See also the uno-mvux-commands skill.
The mutation method is UpdateAsync — public static ValueTask UpdateAsync<T>(this IState<T> state, Func<T?, T?> updater, CancellationToken ct = default).
There is no Update method on IState<T> — calling state.Update(x => ...) is a compile error. The baseline model frequently emits this wrong name; the skill must keep the correct name front-and-centre.
UpdateAsync returns ValueTask — await it from inside an async method (typically a command body).
The updater must be pure — derive the new value solely from the current parameter it receives. Do not capture or read external/mutable variables, and do not perform side effects inside it. MVUX is stateless and lockless: the updater is applied against the state's current cached value, so a function that depends on anything other than current is not guaranteed to produce a stable result. The official docs model this by declaring the updater as a static local function, which the compiler prevents from capturing enclosing state:
// Correct: a pure projection of the value you were given
static int increment(int current) => current + 1;
await Counter.UpdateAsync(increment);
// Wrong: result is not derived from `current`, it captures external state
await Counter.UpdateAsync(_ => _someExternalField);
IState<T> is mutable — it supports read and write operationsState<T>.Empty(this) requires passing this as the owner for lifecycle managementawait state.UpdateAsync(current => newValue) to update programmaticallystate.ForEach(async (value, ct) => { ... }) to react to changes