4 ms·
{}... {} everywhere why wouldn't you switch the attributes to the second param and set default value {}? seems really redundant this way
by high_byte 6y ago
{}... {} everywhere
why wouldn't you switch the attributes to the second param and set default value {}?
seems really redundant this way
- SahAssar 6y agoAll the HTML functions are variadic, so you can write section({}, h1({}, 'text'), article({}, 'text'), footer({}, 'text') ) instead of section({}, [ h1({}, 'text'), article({}, 'text'), footer({}, 'text') ]) It's a choice, but I think without it you would have a lot more array openings/closings, and they would be more spread out instead of the empty objects, which are kept in the same place.
- abraxas 6y agoYour answer makes a lot of sense. I think you've made the right compromise.