Salesforce Lightning Web Component

Salesforce

How to pass data from one LWC to another in Salesforce?

Sample Code: sample.messageChannel-meta.xml: <?xml version="1.0" encoding="UTF-8"?> <LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata"> <masterLabel>Sample</masterLabel> <isExposed>true</isExposed> <description>This is a sample Lightning Message Channel.</description> <lightningMessageFields> <fieldName>variable1</fieldName> <description>Variable 1</description> </lightningMessageFields> </LightningMessageChannel> component1.html: <template> <lightning-card title="Component 1"> <lightning-button label="Publish" ....

Salesforce

How to check and uncheck check box lightning:input in LWC in Salesforce?

Sample Code: HTML: <template> <div class="slds-theme--default slds-p-around_large"> <lightning-input type="checkbox" label="Basic option" checked={showBool}></lightning-input><br/><br/> <lightning-button variant="brand" label="Uncheck" onclick={hide}></lightning-button> </div> </template> JavaScript: import { LightningElement } from 'lwc'; export default class Sample extends ....