Created
November 16, 2016 15:27
-
-
Save gabmontes/c84df01d834ca20076fcaaa36ff85b70 to your computer and use it in GitHub Desktop.
A minimal (re)implementation of ReactDOM for learning and teaching purposes.
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
| /** | |
| * not-react | |
| * | |
| * A minimal (re)implementation of ReactDOM for learning and teaching purposes. | |
| * | |
| * https://medium.com/@gab_montes/react-in-200-bytes-28156e714165 | |
| */ | |
| // eslint-disable-next-line no-extra-semi | |
| ;(function (global) { | |
| global.notReactDOM = { | |
| render: function (component, element) { | |
| element.innerHTML = typeof component === 'function' | |
| ? component() | |
| : component | |
| } | |
| } | |
| })(this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment