0

My scenario is little different. I have multiple widget on my page each has a minified js file which will render content (HTML).

I have list of widget from server and all js file will render on page load.

My question is how can i find a placeholder for my widget? I have minified Js file but how can i pass props into that so js file know the place where content needs to render.

I can modified minified js file but can not include in my bundle. It should be separate.

Js file render on demand and component also render on demand but no relation between them, Although js file understand the component and render content inside it.

V_B
  • 1,571
  • 5
  • 16
  • 37

1 Answers1

0

If i understand it correctly. Since each of your widgets have a separate minified javascript file, I am assuming they are mutually exclusive of each other.

Also, assuming they are mutually exclusive of each other, each widget rendering html should have its own logic of fetching and displaying data. That being said, all you need to ensure is that which placeholder calls which minified file.

In this way all placeholders will call their respective widget files which will render the data accordingly.

Hope this answers.

Aseem Upadhyay
  • 4,279
  • 3
  • 16
  • 36