Thank you very much Robert,
I have actually tried the second option you mentioned
(preact/compat), but it didn't work. Control didn't appear on the screen and it also gave a warning saying:
Can't call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the t component.I'll try to apply the first approach you mentioned & let you know further findings.
Warm Regards,
Anuj A. Pachawadkar