Skip to content

Instantly share code, notes, and snippets.

@Colo-Codes
Created November 23, 2021 20:07
Show Gist options
  • Select an option

  • Save Colo-Codes/b7875d65cd9f46ec3d078643dc8c65e0 to your computer and use it in GitHub Desktop.

Select an option

Save Colo-Codes/b7875d65cd9f46ec3d078643dc8c65e0 to your computer and use it in GitHub Desktop.

Revisions

  1. Colo-Codes created this gist Nov 23, 2021.
    10 changes: 10 additions & 0 deletions react-class-component.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    class Welcome extends React.Component {
    constructor(props) {
    super(props);
    this.state = { counter: 0 };
    }

    render() {
    return <h1>Hello, {this.props.name}</h1>;
    }
    }