snabbdom/snabbdom

Hook signature of create

Open

#275 opened on Apr 18, 2017

View on GitHub
 (2 comments) (3 reactions) (0 assignees)TypeScript (11,106 stars) (1,118 forks)batch import
affects:usergood first issuetype:enhancement

Description

Would you be in favor of simplifying the hook signature of create ? It takes an arbitrary emptyVnode as a first argument.

The fact that the logic is reused in the core modules for the create and update phases should not bother users everytime they want to do something in a create hook. I use this hook a lot and it's so annoying.

It would just be a matter of creating a wrapping function in the modules.

If you all agree, I'm happy to create a PR when I have some time.

Contributor guide