-
Notifications
You must be signed in to change notification settings - Fork 17
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
ijk that returns an opinionated Virtual DOM schema out of the box? #10
Comments
It would be much nicer if we didn't have to pass a schema so yeh, I would certainly consider it. Another option I thought of is to be able to pass
Either that or export different
I am up for exploring all of these options! |
I think both options are possible. I've seen the second style used in other projects that support different view frameworks. |
Hyperapp's vdom object schema changed. So I am going to do something about this now. I'd like to export just one The obvious downside to this is if people want to use this lib with other vdom libraries. In reality I doubt anyone is so perhaps it is better to be opinionated now and change later if required. |
Maybe you can still export the original import { h } from "ijk/factory"
h("name", "props", "children")(...) |
Perhaps something as rudimentary as.. export const h = build('nodeName', 'attributes', 'children')
export const factory = build I can't decide 😅 something else to consider is what @jorgebucaran said about keys.. and where they live. Which I believe, is no longer in attributes but on the root of the vnode itself. Am I right in thinking this? |
Yes, they are now taken from the attributes and placed on the root of the virtual node itself. |
@lukejacksonn I think using the framework's exported VDOM builder function is far more robust than my proposal, but if you are willing to take the "risk", returning the raw VNode object would make ijk even more fun to use. Whether you implement this feature or not is up to you. You did a great job here! |
@lukejacksonn If jorgebucaran/hyperapp#578 lands, would you consider changing ijk so it can be used like this:
...without a call to
h('name','props','children')
to create the actualh
function? In other words, have the exportedh
return an opinionated Virtual DOM schema like { nodeName, attributes, children }.The text was updated successfully, but these errors were encountered: