ReactJS: Functional Stateless Components

maxresdefault

Smart programmers are naturally lazy! Why, cause they write code in such a way that, the next time they need a certain chunk of code, they can refer to it, with just a single line of code. Reusability, Reusability, Reusability! ReactJS provides such capability through the use of components.

Prior to React 0.14, components were defined as ES6 classes, as seen below:

class Price extends React.Component {
    render(){
        return <span>$, {props.price}</span>
    }
}

Continue reading “ReactJS: Functional Stateless Components”