ijk icon indicating copy to clipboard operation
ijk copied to clipboard

broken with superfine

Open aeosynth opened this issue 7 years ago • 2 comments

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)
}

aeosynth avatar Sep 01 '18 04:09 aeosynth

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?

lukejacksonn avatar Sep 04 '18 09:09 lukejacksonn

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.

aeosynth avatar Sep 04 '18 09:09 aeosynth