I am trying to assign value to a property of my parent component's constructor method. Below is the html code:
<template>
{welcomes}
<c-testfile></c-testfile>
</template>
Below is the js code:
import { LightningElement } from 'lwc';
export default class testfile extends LightningElement {
constructor() {
console.log('inside constructor');
super();
this.welcomes='mine';
}
}
I am calling this lwc component from an aura component and when I am running the aura app, the constructor is called multiple times and I am getting the below error:
Why the constructor is called multiple times here?