Files

9 lines
420 B
Markdown

---
name: blazor-state-performance
description: Performance & State Persistence in Blazor .NET 10
---
# Performance Rules
- **State Management:** Use `PersistentComponentState` to sync data between prerendering and client-side.
- **Optimization:** Use `@key` directive for list iterations to minimize DOM diffing.
- **Memory:** Always implement `IAsyncDisposable` in components using JS Interop to prevent memory leaks.