Created
August 19, 2019 08:25
Star
You must be signed in to star a gist
Two utilities that will create node and append node to that parent node you just created. I've seen these somewhere else so I just shared to you as well.
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
// Utility for creating Nodes | |
export const createNode = element => { | |
return document.createElement(element); | |
}; | |
// Utility for appending node to parent Node | |
export const appendNode = (parent, el) => { | |
return parent.appendChild(el); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment