Last active
January 31, 2018 22:39
-
-
Save lefnire/e8e1cd5275a5b43b22f9013c8f5c41e7 to your computer and use it in GitHub Desktop.
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 {Home} from './Home.js'; | |
import React from 'react'; | |
class App extends React.Component { | |
render() { | |
return ( | |
<div className="container container-fluid"> | |
<!-- maybe some menu / header stuff here. Anything that's shared b/w all your pages --> | |
<Home /> | |
</div> | |
); | |
} | |
} | |
ReactDom.attach(App).to('#app'); // or however that stuff goes |
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 React from 'react'; | |
export default class Home extends React.Component { | |
render() { | |
return ( | |
<div>bla bla bla</div> | |
); | |
} | |
} |
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
<html> | |
<head> | |
<script src="bundle.js" /> <!-- this is all your JS files combined and compiled using Webpack --> | |
<link href="styles.css" /> | |
<!-- this import Bootstrap, which is a framework that gives you some nice styles / CSS out of the box (hence the classes / clasNames that you don't recognize, like "container") --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div id="app" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment