constructor in Lightning Web Component — Learn Force.com


Constructor() method fires when a component instance is created. The constructor in LWC flows from parent to child which means Constructor of Parent component will get called first if you have parent child component composition. Child Component and Controller – childComp .html Child Component Called childComp.js import { LightningElement } from ‘lwc’; export default class childComp extends LightningElement { pChildList = []; constructor() { […]

via constructor in Lightning Web Component — Learn Force.com