Skip to content

Instantly share code, notes, and snippets.

@kylpo

kylpo/block6.jsx Secret

Created June 21, 2017 23:23
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 kylpo/8ed87c506a594eb9ea36c57de52fab42 to your computer and use it in GitHub Desktop.
Save kylpo/8ed87c506a594eb9ea36c57de52fab42 to your computer and use it in GitHub Desktop.
function createElement(label, component, props, children) {
console.log(`${label} element created`)
return React.createElement(
component,
props,
children
)
}
export default class App extends React.Component {
render() {
return (
createElement(
'Cloning_',
Cloning_,
null,
createElement(
'Div',
Div,
{ hi: 'hi' },
),
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment