I need to decide what component needs to be displayed based on backend response.
Eg: i get this response from backend
{ plugin:
{
id = 'inputfieldWidgetV12'
}
data: {
value = 'helloWorld'
}
}
based on this I need to display a component inputfieldWidgetV12.ts, and pass the data to its constructor : {value = 'helloWorld'}.
how can I inject the component what i do not know during implementation?
I have tried require(plugin.id) but it didn't work.