Created
May 31, 2017 10:13
-
-
Save larryparitosh/4aadf43bca3e481da1e9176d8da10fdf to your computer and use it in GitHub Desktop.
Basic Angular Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import Component from React module | |
import React { Component } from 'react'; | |
// Component Class | |
export default Class AppComponent extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
title: 'Hello World' | |
} | |
} | |
render() { | |
// this will render as HTML | |
return <h1>{this.state.title}</h1> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment