react-shadow-wrapper
Wrapper componenet for ReactJS that allows you to render multiple child components without adding unnecessary DIVs to the DOM.
Installation
$ npm install react-shadow-wrapper
Usage
Import the component:
;
When you render your component, wrap it in with :
Typically, you would need to wrap the components in a DIV, and the resulting HTML outputed would look like:
...your components nested under the div
When using ShadowWrapper, your output looks like:
...your components are no longer nested in a useless div!
Example
If you're still unsure how this masterpiece works, checkout the working example here: https://www.npmjs.com/package/react-shadow-wrapper-example