I've been using rails' erb template for my views, but I've recently been trying to incorporate React as my front end framework. I'm a little lost on how front end frameworks are supposed to be used.
e.g. Using React to render a static button
var AddProspects = React.createClass({ displayName : 'AddProspects', render: function() { return ( <button type="button" className="btn btn-info pull-right btn-block" data-toggle="modal" data-target="#uploadModal"> <i className="fa fa-plus"></i> Upload Prospects </button> ); } }); React.render(<AddProspects />, document.getElementById("#add-prospects"));
e.g. Using normal html
<button type="button" class="btn btn-info pull-right btn-block" data-toggle="modal" data-target="#uploadModal"> <i className="fa fa-plus"></i> Upload Prospects </button>
Using React in this example seems to be a overkill.
Should I be using React for the whole view? Should React be rendering everything from static html to dynamic data from the server side? Or is it better to use it just for elements that interact with the server and leave static stuff to plain html?