Skip to content
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

add attr-foo support, related to #6 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahdinosaur
Copy link

it's purely sugar, as now i realize attributeHook is included in virtual-hyperscript.

@Raynos
Copy link
Owner

Raynos commented Sep 3, 2014

This might not be the best way to do attributes.

I like the syntax, but I think hooks are too heavy.

cc @Matt-Esch does props.attributes.x = bar work ?

@ahdinosaur
Copy link
Author

looks like it: Matt-Esch/vdom#11 and https://github.com/Matt-Esch/virtual-dom/blob/master/test/attributes.js.

mercury is not using that version of vdom though, so this is the only way i'm aware of that works right now with the rest of mercury. however, i'm fine using attributeHook for now and once we can pass in attributes as a property, this sugar seems unnecessary.

@Raynos
Copy link
Owner

Raynos commented Sep 4, 2014

the sugar is nice for consistency. I prefer 'attr-foo-bar': x over attributes: { 'foo-bar': x }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants