Created
September 30, 2019 18:11
-
-
Save mikaelbr/23b9c0e7ca26da68b8a76df8082b9840 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!" | |
) | |
); | |
// When clicking button: | |
//> Hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment