Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1795

Issue getting generic JSX transform to work with lite-jsx

$
0
0

Well, since that wouldn’t work easily, this JS might be a starting point for wrapping h?

const wrappedH = (tag, props) => {
  const {children, ...restProps} = props ?? {};
  const childArray = Array.isArray(children) ? children : [children]
  return h(tag, restProps, ...childArray)
};

Viewing all articles
Browse latest Browse all 1795

Trending Articles