Reactjs and requirejs

While working on the QlockTwo project I was struggling with combining react.js and require.js.

Finally I get it done:

  1. Download require.js from and and jsx.js from and put both e.g. in the javascript folder in your project.
  2. Index.html contains in the header the link to the require.js file:

  3. My app.js (main entry point from the index.html) looks like that

  5. Qlock.js contains the jsx components that get rendered now. Please be aware that if you decide to use require.js you should load all your Javascript libraries with it to avoid errors.


GD Star Rating

Kommentar verfassen

This site uses Akismet to reduce spam. Learn how your comment data is processed.