Last active
May 19, 2016 16:02
-
-
Save dskecse/65da8e6ea849aade7c7f39c96adf96f1 to your computer and use it in GitHub Desktop.
stateless React component
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 { render } from "react-dom" | |
const mountNode = document.createElement("div") | |
mountNode.id = "container" | |
document.body.appendChild(mountNode) | |
const name = "David" | |
function Component(props) { | |
const { name } = props | |
return <h1>Hello {name}</h1> | |
} | |
render(<Component name={name} />, mountNode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment