Namespaced components
"Shawn, you must have used modules and packages in languages such as Ruby and Java. The idea behind these concepts is to create a namespace hierarchy of code such that the code from one module or package doesn't interfere with another."
"Yes. Is something like this available with React?" Shawn asked.
"Yes. React allows creating components that are namespaced under a parent component so that they don't interfere with other components or global functions."
"We are using very generic names such as Rows and Headings that can be used later in other parts of the app too. So it makes sense to namespace them now, rather than later." explained Mike.
"Agreed. Let's do it right away," Shawn.
"We need to represent the top-level component as custom component rather than using the <table>
element."
var RecentChangesTable = React.createClass({ render: function() { return <table> {this.props.children} </table>; } });
"Now, we can replace...