Loading tutorials
{owner}, and that you know a reactive field re-renders the template when its value changes. You should 6 min read{property} binding works. It also assumes you know what a getter is. The directive syntax is covered in the next chapters. Here the focus is narrower: when you give lwc:if a value, how does LWC deci5 min readlwc:if directive. It assumes you can read a Lightning Web Component (an HTML template plus a JavaScript class). It also assumes you know how to bind a property with curly braces and how to handle a click event. The chapter shows how a condition adds and removes DOM, which v4 min readlwc:if (and its companions lwc:elseif and lwc:else) in a template. You can attach them to a <template> tag or directly to an HTML element. The two forms look similar, but they differ in what ends up in the DOM, how you group content, and which mistakes y5 min read{property} binding, reactive fields, event handlers, and JavaScript getters. You should also have seen lwc:if on its own. Here you learn how to feed it conditio5 min readlwc:if shows content when a property or getter is truthy. Here you add the other half: a fallback block that renders when the condition is not met.4 min readlwc:if to show or hide a block. Here you add middle branches to a conditional block.5 min readlwc:if, lwc:elseif, and lwc:else compiles and renders as you expect. It assumes you can write an LWC template and a JavaScript class, bind properties with curly braces, and write getters. It also assumes you have already used a singl5 min readlwc:if, lwc:elseif, lwc:else chain and that you know how getters feed conditions in a template. It covers placing one chain inside a branch of another, how the engine evaluates nested chains, and when a flat chain is the better choice.5 min readlwc:if, lwc:elseif, and lwc:else in earlier chapters. It covers how to convert templates that still use the older if:true and if:false directives, and where the two approaches behave differen6 min read@api properties, and use lwc:if and lwc:else in a template. It covers what the framework does to child components when a branch turns on or off, and how to write code that handles it.4 min readlwc:if, lwc:elseif, and lwc:else, and that you know the lifecycle hooks connectedCallback and disconnectedCallback. The goal is to decide, for a given piece o5 min readlwc:if, lwc:elseif, an4 min read