Created
September 30, 2019 18:09
-
-
Save mikaelbr/5bdc737c8e0a609628930024eb7fdce9 to your computer and use it in GitHub Desktop.
Code example from blogpost https://medium.com/variant-as/abstracting-the-dom-by-making-ad-hoc-react-like-library-1c9b42618e63
This file contains 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
const { button } = createUiFramework(); | |
document.body.appendChild( | |
button( | |
{ | |
type: "button", | |
onClick() { | |
console.log("Hello"); | |
} | |
}, | |
"Click me!" | |
) | |
); | |
//> <button type="button" onclick="onClick() { | |
//> console.log("Hello"); | |
//> }">Click me!</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment