Skip to content

Instantly share code, notes, and snippets.

@sirbrillig

sirbrillig/App.js

Created Jan 17, 2016
Embed
What would you like to do?
Using React stateless components for quick prototyping
import React from 'react';
const Header = () => <div className="header"><img className="header__logo" src="/assets/logo.png" /><h1 className="header__title">My App</h1></div>;
const ToDoList = () => <div className="to-do-list"><h2 className="to-do-list__title">To Do</h2></div>;
const Controls = () => <div className="controls"><h2 className="controls__title">Controls</h2></div>;
const Footer = () => <div className="footer">Made by Me</div>;
export default React.createClass( {
render() {
return (
<div className="app">
<Header />
<ToDoList />
<Controls />
<Footer />
</div>
);
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment