Created
May 20, 2019 09:21
-
-
Save Rainbowrain-TW/1ee1dc46d3dad5c6927283eb592ac747 to your computer and use it in GitHub Desktop.
Simpest React 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
//引入 React 及 Component | |
import React, {Component} from 'react' | |
//建立一個名為 App 的類別並繼承 Component | |
class App extends Component{ | |
render(){ | |
return ( | |
<div>Hello React</div> | |
) | |
} | |
} | |
//匯出寫好的 App | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment