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

broken with superfine #24

Open
aeosynth opened this issue Sep 1, 2018 · 2 comments
Open

broken with superfine #24

aeosynth opened this issue Sep 1, 2018 · 2 comments

Comments

@aeosynth
Copy link

aeosynth commented Sep 1, 2018

ultradom is now superfine, it returns to the 'name, 'props', 'children' signature, and it requires text nodes to be wrapped in a vnode: https://github.com/jorgebucaran/superfine/blob/master/src/index.js#L368-L381

var createVNode = function(name, props, children, element, key, type) {
  return {
    name: name,
    props: props,
    children: children,
    element: element,
    key: key,
    type: type
  }
}

var createTextVNode = function(text, element) {
  return createVNode(text, EMPTY_OBJECT, EMPTY_ARRAY, element, null, TEXT_NODE)
}
@lukejacksonn
Copy link
Owner

I don't user superfine that much, so thanks for letting me know. The name, props, children shouldn't be an issue as the schema is configurable (although the README could do with ubdating as it still references Ultradom with the old schema).

What case fails specifically and do you have a fix for it?

@aeosynth
Copy link
Author

aeosynth commented Sep 4, 2018

it fails with a simple ['div', 'hello world']. you might be able to fix it by copying the createTextVNode function, including type: TEXT_NODE, but I didn't get it working, and it might double the size of ijk.

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

No branches or pull requests

2 participants