React
by Lalji Tadhani
HTML
<div id="app">
</div>
React
class TodoApp extends React.Component {
constructor(props) {
super(props)
this.state = {
items: [
{ text: "Learn JavaScript", done: false },
{ text: "Learn React", done: false },
{ text: "Play around in JSFiddle", done: true },
{ text: "Build something awesome", done: true }
]
}
}
render() {
return (
<ul
style={{
position: "absolute",
width: "75%",
height: "5%",
left: "12.5%",
top: "25%",
"list-style-type": "none",
"background-color": "#f8d7d7"
}}
>
<li
style={{
width: "20%",
float: "left",
height: "100%"
}}
>test</li>
<li
style={{
width: "20%",
float: "left",
height: "100%"
}}
>test</li>
<li
style={{
width: "20%",
float: "left",
height: "100%"
}}
>test</li>
</ul>
)
}
}
ReactDOM.render(<TodoApp />, document.querySelector("#app"))