Closed acstll closed 8 years ago
I think it would be much easier to import. I always like to provide sane defaults like this. I'm definitely in favor of this change! :+1:
In general though, it might be better to ask if are there any drawbacks to this approach? If so, can they be avoided?
I don't see any drawbacks, since both ways of importing, normal and shortcut, will be available.
If you're using snabbdom already, then the current way should be familiar and no problem, but it's also true that if you don't want to get fancy the two built-in modules is all you're gonna need, so it's nice to offer the shortcut.
I'll merge and bump a major then!
:+1:
The main export becomes an
toHTML
function, ready to use.init
is available atsnabbdom-to-html/init
if you need it.Check this branch out where it's implemented: https://github.com/acstll/snabbdom-to-html/tree/toHTML
What do you think?
@TylorS