Lwc Conditional Rendering

Use when writing, reviewing, or migrating Lightning Web Component templates that branch between UI states with `lwc:if`, `lwc:elseif`, and `lwc:else`, including getter-backed booleans, loading/error/ready state machines, keep-state vs reset-state toggles, and legacy `if:true` / `if:false` cleanup. Triggers: 'lwc:if vs if:true', 'lwc:elseif not working', 'conditional rendering in lwc', 'complex boolean in template'. NOT for choosing between component types at runtime — use lwc/lwc-dynamic-components. NOT for list rendering — use `for:each` or `iterator:it`.

PranavNagrecha 88148fd 7 files · 39.0 KB Updated 15 repo stars

File contents

PranavNagrecha/AwesomeSalesforceSkills/tree/main/skills/lwc/lwc-conditional-rendering commit 88148fd4eb

Frequently asked questions

npx skillmds add pranavnagrecha/lwc-conditional-rendering