Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/NEO97online/stencil-fragment
- Owner: NEO97online
- Created: 2018-10-12T12:05:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T12:07:12.000Z (about 6 years ago)
- Last Synced: 2024-08-01T13:16:50.836Z (3 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 18
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-stenciljs - Stencil Fragment
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...
)
}
```