v1.3.0
You can now use the create
helper function to build createElement
functions, like so:
import {create} from "docrel"
let [div] = create("div")
The create
function accepts string arguments that correspond to HTML tag names, and returns an array of createElement
functions.
You can then use those functions to pass the remaining createElement
params, like options and children:
let wrapperDiv = div({class: "div-a"}, [div({class: "nested-div"})])
The createElement
function is used behind the scenes and is still available.