How to inject react into a yii project

Hi, I want to know how do I inject a react data table into a single view of an existing yii project.

I found a related thread in here ( and tried according to it, but it’s not working.

At this point, the view can access my js file, but it does not render the react html section. Also, there is no any error displaying.

Here is my js file:(web/js/react-table.js)

var SimpleComponent = React.createClass({

render: function() {

    return (




} );


<SimpleComponent message="React Demo" />,

document.querySelector( '.test' )


In view file there is a <div class="test"> to get the component property values.

Can anyone please explain what is wrong in here. Thanks in advance…!