1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Use React Fragments to wrap adjacent JSX elements without adding unnecessary wrappers

    reactReact

    In this lesson, we are going to use React Fragments to wrap adjacent JSX elements without introducing unnecessary wrapper elements to DOM.

    Before Fragments came along, the popular pattern was to wrap enclosing elements inside of

    tags which didn't serve any purpose apart from being a wrapper. This can lead to a huge DOM structure which may be difficult to navigate in devtools and may also lead to some performance issues if our app is large. This lesson will show a better approach to dealing with that problem.