Injecting component at runtime

I am trying to build a modular React that displays widgets. For example, You might have a calendar widget and a clock widget.

Each widget being a different project, I am looking for a way to inject them at runtime in my main react app, knowing that they were not transpiled with it.

I looked into React.createElement(), but I did not managed to get it to work

  • Each Widget in of it self is a react project
  • Want to compile them seperately and then import them in my main react app while it is running.

You can find the source code here https://github.com/fastboyz/dashy-react