Checklist
Checklist in the Performance guide.
- Read signals where they are used; do not read them into a plain variable at the top of the component.
- Derive once (
const x = ...oruseMemo) and read it in many places. - Lists of objects:
<For each={...} key={...}>. Selection:useSelector. - One store for list data instead of one signal per row.
- Everything with a lifetime (timers, listeners, sockets) gets an
onCleanupin the scope that made it. lazyfor route components and heavy, rarely used features.