--- title: Use {{#let}} to Avoid Recomputation impact: MEDIUM impactDescription: 30-50% reduction in duplicate work tags: templates, helpers, performance, optimization --- ## Use {{#let}} to Avoid Recomputation Use `{{#let}}` to compute expensive values once and reuse them in the template instead of calling getters or helpers multiple times. **Incorrect (recomputes on every reference):** ```glimmer-js // app/components/user-card.gjs ``` **Correct (compute once, reuse):** ```glimmer-js // app/components/user-card.gjs ``` **Multiple values:** ```glimmer-js // app/components/checkout.gjs ``` `{{#let}}` computes values once and caches them for the block scope, reducing redundant calculations.