Skip to content

Instantly share code, notes, and snippets.

@pomber
Created April 27, 2017 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pomber/afc3def7d1f9d04a33a8b0022b6f5688 to your computer and use it in GitHub Desktop.
Save pomber/afc3def7d1f9d04a33a8b0022b6f5688 to your computer and use it in GitHub Desktop.
const element = {
type: "div",
props: {
id: "container",
children: [
{ type: "input", props: { value: "foo", type: "text" } },
{
type: "a",
props: {
href: "/bar",
children: [{ type: "TEXT ELEMENT", props: { nodeValue: "bar" } }]
}
},
{
type: "span",
props: {
onClick: e => alert("Hi"),
children: [{ type: "TEXT ELEMENT", props: { nodeValue: "click me" } }]
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment