AGENT SKILL

dioxus

Dioxus production guidance for component architecture, state boundaries, hooks correctness, and UI rendering performance in Rust apps.

License 许可
MIT
最近更新
2026-09-14
Stars
★ 1
Forks
0

01 前言 Front Matter

name
dioxus
agents
[ "coder", "sidekick-reviewer", "architect", "feature-designer", "feature-reviewer", "planner", "ask", "builder", "orchestrator" ]
detect
{ "content": [ { "file": "Cargo.toml", "contains": "dioxus =" } ] }
description
Dioxus production guidance for component architecture, state boundaries, hooks correctness, and UI rendering performance in Rust apps.

03 SKILL.md 正文

This skill provides production Dioxus guidance for building composable, performant UI components with correct hook usage and clear state boundaries aligned to official framework practices.

Scope

  • In scope: Dioxus component design, RSX rendering patterns, hook usage, and UI-focused performance guidance.
  • Out of scope: backend/service architecture, non-Dioxus Rust frameworks, and low-level runtime internals.

Invariants

  • Keep components focused and composable; each component should own one clear UI concern.
  • Follow Rules of Hooks strictly (no conditional or reordered hook calls).
  • Keep state as local as possible; avoid broad top-level state that triggers unrelated rerenders.
  • Prefer immutable data flow through props and explicit event callbacks.
  • Optimize only after measurement; avoid premature complexity in RSX/render paths.

Validation Checklist

Failure Handling

  • If rerender churn increases, stop and narrow state ownership before adding memoization.
  • If a hook must become conditional to make code "work", redesign component boundaries instead.
  • If props require interior mutability to function, refactor the state model to explicit ownership.

High-Value Dioxus Practices

  • Prefer small, pure view components with explicit props over monolithic pages.
  • Keep dynamic RSX regions minimal and stable to reduce unnecessary work.
  • Model async UI states explicitly (idle/loading/success/error) instead of booleans.
  • Use production/release profiling signals before shipping performance-oriented changes.

04 同仓库更多 Skills