React Component

Declarative(Functional) Component

const Demo = (props) => {
    return <h1>Hello, {props.name}</h1>;
}

const Demo = (props) => (
    <h1>Hello, {props.name}</h1>;
)

Class Component

class Demo extends React.Component {
    render() {
        return <h1>Hello, {this.props.name}</h1>;
    }
}

results matching ""

    No results matching ""