In LWC, I am trying to implement onload/doInit logic as in aura component. for a certain scenario I have to reinvoke/call that doInit method from the parent component.
Instead doInt,in LWC am achieving this using @api on connectedCallback method
Child Component
//child.js
@api
connectedCallback(){
// my do init logic
}
Parent Component
//parent.js
...
this.template.querySelector('c-child').connectedCallback();
...
Is it good to make connectedCallback() public? Is there any other issue which will affect this modal? If not please give me a good modal for DoInit in LWC
Thanks in advance.