Posted by Igor Benic

Web Developer who mainly uses WordPress for projects. Working on various project through Codeable & Toptal. Author of several ebooks at


  1. Hello Igor,
    I see that you have used vanilla html controls in your react component and then integrated reactjs with WordPress. However I am still unable to wrap my head around integrating prebuilt react UI components like

    in my react component and then integrating the component with WordPress. How would we do the same?
    I have been told to build the component (with the prebuilt react UI components), generate the bundled javascript\css files for the component using webpack (or the create-React-app build scripts) and then enqueue them in wordpress. This however does not work. please see here:

    Similarly in this tutorial, you have a added a “No recommended in production, better to babelify your script”, when registering\enqueuing babel-js scripts. Can you provide more details around the same, in your next tutorial?


  2. I have an article on setting up Webpack 3 to work with ES6 and later so that might help you.

    I have not yet encountered such issue so I could not give you any advice from my own experience. But if you do happen to solve it, please let me know in a reply on this comment.


  3. I installed this and I’m getting an error “Target container is not a DOM element”. How do I fix this?


    1. Hi Ilene, I’ve tried it and it works fine on my side. Can you check if all the code is written correctly?


  4. Hi Igor,
    Thanks for this great tutorial. Is it really necessary to load the two react scripts ?
    Can we just use [‘wp-element’] as a dependency when we register our script ?
    And then using wp.element instead of React in the js ?
    Thanks a lot


    1. Hi Ravon, this tutorial was done before Gutenberg started so such dependencies were not yet available. You could try doing that, just be sure the wp.element dependency has the React DOM element that you can use to load the app onto an HTML element.


  5. Clément Ravon April 8, 2019 at 12:15 pm

    Wow so fast an answer : thx a lot !


Leave a reply

Your email address will not be published. Required fields are marked *

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