Created
January 2, 2017 14:28
-
-
Save casprwang/aba383ae62548b47909dd4df0ceacd60 to your computer and use it in GitHub Desktop.
import state and stateless components
This file contains hidden or 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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import {Header} from './Header' //with state | |
import Header2 from './Header2' //without state | |
export class App extends React.Component { | |
render(){ | |
return ( | |
<div> | |
<div className=""> | |
<h1>Hello</h1> | |
<Header age={37}/> | |
</div> | |
<div className=""> | |
<Header2 age={33}/> | |
</div> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment