Currently, the render method can only return one element / component. See: here
In the discussion on this ticket, some suggest wrapping several elements returned from the React component in an HTML comment so that the browser does not ignore the packaging component, for example:
<A> <B></B> <Fragment> <C></C> <D></D> </Fragment> <E></E> </A>
will give out:
<a> <b></b> <c></c> <d></d> <e></e> </a>
But how to actually create a component that displays only HTML comment? In other words, what would the rendering function of the fragment component look like in the above example?
javascript dom html5 reactjs react-jsx
Amiramix
source share