My_Test_Repo/force-app/main/default/lwc/pubSubComponentA/pubSubComponentA.js

11 lines
329 B
JavaScript

import { LightningElement } from 'lwc';
import pubSubComponent from 'c/pubSubComponent';
export default class PubSubComponentA extends LightningElement {
message;
inputHandler(event){
this.message = event.target.value;
}
publishHandler(){
pubSubComponent.publish('componentA',this.message)
}
}