What problem does it solve?
Valdi apps re-render child components whenever a viewModel reference changes, so object literals, inline callbacks, and per-render allocations created inside onRender() cause unnecessary re-renders, slow first paint, and janky scrolling. This Skill provides concrete patterns to find and fix those reference-identity, rendering, and threading problems.
Core Features & Use Cases
- Reference Stability Patterns: Keep viewModels, callbacks, render props, and Style objects stable across renders using class arrow functions, pre-computed viewModels in onViewModelUpdate, createReusableCallback, remember, and module-level Style instances.
- Rendering & List Optimization: Choose <layout> over <view> for virtual containers, use stable keys in lists, batch setState calls, and enable native sticky headers to eliminate scroll lag.
- Startup & Threading Offload: Defer work with Lazy, Provider, dynamic import(), lazyImport, setTimeout(0) subscription deferral, cacheObservable, and Worker Services with MessageChannel for heavy computation.
- Use Case: A Valdi screen stutters when scrolling a list and re-renders every row on each state change. Apply stable keys, a cached row viewModel, a class-arrow renderItem, and cacheObservable on the data stream to eliminate the redundant renders.
Quick Start
Ask the assistant to review your Valdi component's onRender() and state updates for performance problems using the valdi-perf patterns.