79640386

Date: 2025-05-27 11:34:40
Score: 2
Natty:
Report link

"we want component name from customer" Does that mean it is based on input selected by customer which component you want to render?

If so, then try this change:

use @api to store the component name to render

@api componentName = "c/dynamicRenderLWC";

then, render LWC component like this:

const ctor = `c/${this.componentName}`;

Reasons:
  • Whitelisted phrase (-1): try this
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @api
  • User mentioned (0): @api
  • Low reputation (1):
Posted by: Umang Verma