preact-hyperscript icon indicating copy to clipboard operation
preact-hyperscript copied to clipboard

createElement should use `div` tag when no tagname is specified

Open laggingreflex opened this issue 9 years ago • 1 comments

import {createElement as h} from 'preact-hyperscript'

h('.class') // => creates an "undefined" tag

It should create "div" tag in this case

laggingreflex avatar Feb 24 '17 23:02 laggingreflex

Whats the benefit over doing the following?

import { div } from 'preact-hyperscript'

div('.class', ...)

queckezz avatar Mar 02 '17 09:03 queckezz