HTML
<template>
<lightning-card title="Parent to Child">
<lightning-layout>
<lightning-layout-item flexibility="auto" padding="around-small">
<lightning-input label="Enter the message" onchange={handler}></lightning-input>
</lightning-layout-item>
<lightning-layout-item flexibility="auto" padding="around-small">
<c-to-uppercase></c-to-uppercase>
</lightning-layout-item>
</lightning-layout>
</lightning-card>
</template>
JavaScript
import { LightningElement } from 'lwc';
export default class MainComp extends LightningElement {
handler(event)
{
this.template.querySelector('c-to-uppercase').changeMessage(event.target.value);
}
}
Video
Video does not exists.