Create own React.Fragment

import React from 'react';
import { render } from 'react-dom';

React.OwnFragment = ({children}) => children

const App = () => (
  <React.OwnFragment>
    <div>We</div>
    <div>have</div>
    <div>own</div>
    <div>Fragments</div>
    <div>!!!</div>
  </React.OwnFragment>
)

render(<App />, document.getElementById('root'));
Did you find this post useful? Show some love!
DISCUSSION
Classic DEV Post from Jun 26

Books vs Online Courses

Which the two learning methods is better for learning a new programming language?

Andrew Luca
How good is your Google Fu? All in Developer!

DEV is a social network for software developers to level up their craft. It's free and it's fully open source.

Sign up