window['$'] = selector => document.querySelector(selector)
window['$$'] = selector => Array.from(document.querySelectorAll(selector))
is really what I want to have window['$'] = selector => document.querySelector(selector)
window['$$'] = selector => Array.from(document.querySelectorAll(selector))
is really what I want to have createElement({
className: 'p-2 flex justify-end',
contents: createElement({
tag: 'img',
src: '/os-logo-maps.svg'
}),
});
I got the idea from Lea Verou's blissfuljs. When you're creating a bunch of nested elements it comes in handy.