Register custom events programmatically in parent
This scenario has been designed for developer who possess Intermediate skills in Lightning Web Component.
- Create a component named dataSender
- Add a number input field
- Whenever value changes in input field, fire an event with entered value
- Create another component with name dataListener
- Call the dataSender in dataListner
- Subscribe the event in dataListner programmatically i.e. using addEventListner in LWC
- Display the value in dataListner html file
Do you need help?
Are you stuck while working on this requirement? Do you want to get review of your solution? Now, you can book dedicated 1:1 with me on Lightning Web Component completely free.
GET IN TOUCH
Schedule a 1:1 Meeting with me
Also checkout this https://salesforcediaries.com/category/lightning-web-component/