Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

How to create a working project with React and Material-ui?



  • I’m trying to build a project from scratch (no framework) with a blank template.
    Then I’m attaching JS Components React and material-ui.

    Should this work out of the box?
    I don’t see how the components loader is going to kick in.

    Should I add something my self?
    Are there any examples how to build custom projects with various JS components?

    generated index.html
    0_1472384949604_img2176.jpg

    imported react as a JSComponent
    0_1472384963992_img2178.jpg



  • I understand that using React with the online tool is not possible.

    I’ve set up a blank project with Local CLI but what I still don’t understand is how to add js libraries.
    Normally I would config webpack with babel to compile react, es6, css, ui libraries etc., but Monaca is already running a webpack instance. How do I solve this?


  • Monaca

    You should be able to change Monaca’s webpack configuration from the project dir files, in this way:

    • Locakit: modify webpack.prod.config.js
    • CLI: modify both webpack.prod.config.js and webpack.dev.config.js

  • Onsen UI

    @beebase You just need to import your libraries normally in your code from node_modules for example. Webpack will bundle them.