-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hooks stringification #15
Conversation
I don't know your exact problem without looking at your dependency tree, but my first suggestion is to depend on
If some other module has an out-of-date dependency on Back to your PR, maybe we are missing a proper test case for https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/index.js#L94-L97 |
@bitinn not sure if shrinkwrap is a good solution, I'd prefer not to use instanceof at all. Instead it'd make more sense to just rely on presence of |
@DeTeam I think If there is a way to avoid using All in all, I think we need to add more tests if we decide to switch to
|
EvHooks set via |
@nthtran EvHook is only used during hyperscript for |
Now that I think of it, my only concern with using But I don't think this change will cause any problem for me, as I haven't found a need to run custom hook yet. |
Yeah I think this change is fine for now as well. At least until |
@bitinn Why do you think In the end hooks that matter for |
@TimBeyer I was referring to Having said that, as suggested in Maybe we should even support Widget rendering through |
+1 for |
Only go with
value.value
when value is a hook.Related to this comment: https://github.com/nthtran/vdom-to-html/pull/10/files#r33026197
Our problem: we're having
virtual-dom
used in a bunch of libraries using each other.vdom-to-html
is used at very very root, which lead us to the case when different versions and therefore hook constructor instances are used for stringifications.You might see some other cases, when
value.value
should not be used. If so — please tell & add tests!/cc @nthtran @bitinn @marlun
* in a relevant issue #13 (comment) also discussed possibility of using
Hook.prototype.toString
.