# react-aux **Repository Path**: mirrors_gaearon/react-aux ## Basic Information - **Project Name**: react-aux - **Description**: A self-eradicating component for rendering multiple elements. - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # react-aux [](https://www.npmjs.org/package/react-aux) [](https://twitter.com/kuizinas) A self-eradicating component for rendering multiple elements. ## Motivation Prior to React v16, returning multiple elements from a component required to wrap them in an auxiliary element, e.g. ```js const Root = () => { return
Hello, World!
I am a demo for react-aux.
Hello, World!
I am a demo for react-aux.
Hello, World!
I am a demo for react-aux.
Hello, World!
I am a demo for react-aux.
``` As you can see, `react-aux` is literally just 3 lines of code. Therefore, you could implement it in your own codebase without using `react-aux`. However, `props => props.children` on its own does not explain the intent. `react-aux` as an abstraction serves the purpose of enabling a self-documenting code, i.e. the next time you see someone doing: ```js import Aux from 'react-aux'; const Root = () => { returnHello, World!
I am a demo for react-aux.
Hello, World!
,I am a demo for react-aux.
]; }; ``` However, it requires manually ensuring key uniqueness and I am too [lazy](http://threevirtues.com/) for this. ### Whats with the name? "aux" is a convention I've been using ever since I remember starting to write HTML/ CSS. Auxiliary element is something that does not have semantic purpose but exist for the purpose of grouping elements, styling, etc.