react-dot-fragment icon indicating copy to clipboard operation
react-dot-fragment copied to clipboard

Support non-web platforms

Open benwiley4000 opened this issue 6 years ago • 2 comments

The use of the DOM api to polyfill fragment means this isn't usable on other platforms.

benwiley4000 avatar Mar 18 '18 01:03 benwiley4000

can't you just replace this with something like:

function Fragment(props) {
    return props.children;
}

wishfoundry avatar Jun 08 '18 03:06 wishfoundry

@wishfoundry I might be missing some context, which you could explain, but I don't think that would work for a couple of reasons:

  1. Array-as-render-result requires keys on each list item whereas Fragment does not.
  2. Array-as-render-result isn't supported prior to React 16. A goal of this lib is to support React 15.

benwiley4000 avatar Jun 08 '18 04:06 benwiley4000