Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/NEO97online/stencil-fragment

A simple implementation of React.Fragment in StencilJS.
https://github.com/NEO97online/stencil-fragment

Last synced: 5 days ago
JSON representation

A simple implementation of React.Fragment in StencilJS.

Awesome Lists containing this project

README

        

# Stencil Fragment

This single line of code adds the same functionality as React.Fragment to your StencilJS app.

The purpose of Fragment is to allow rendering multiple sibling elements without the need to return an array in your render function.

Essentially, Fragment is an "empty element" which can hold child elements without itself being rendered to the DOM. This avoids needless `

` wrappers and arrays.

## Usage

```
npm i stencil-fragment
```

```tsx
import Fragment from 'stencil-fragment'

render() {
return (

First element...

Second element...

Another element...


)
}
```