I have a Box.jsx
component that in turn requires another InputBox.jsx
component and all this is rendered in a main.jsx
. It turns out that Box.jsx
does render but apparently it is not rendering correctly InputBox.jsx
. I do not have any errors in the cmd console.
Box.jsx
var React = require('react');
var inputBox = require('../boxes/inputBox.jsx');
var Box = React.createClass({
render: function(){
return(
<div className="container">
<inputBox/>
</div>
);
}
});
module.exports = Box;
inputBox.jsx
var React = require('react');
var inputBox = React.createClass({
render: function() {
return(
<div className="row">probando</div>
);
}
});
module.exports = inputBox;
The result in the browser is as follows:
<div data-reactroot="" class="container">
<inputbox></inputbox>
</div>
The browser console gives me the following error:
Warning: inputBox: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.