Add React fragment support (#148)

This commit is contained in:
Kabir Goel 2022-12-21 00:13:32 +05:30 committed by GitHub
parent 76e6a690ce
commit 84ca907aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,7 @@ from .cond import Cond
from .container import Container
from .flex import Flex
from .foreach import Foreach
from .fragment import Fragment
from .grid import Grid, GridItem, ResponsiveGrid
from .html import Html
from .spacer import Spacer

View File

@ -0,0 +1,9 @@
"""React fragments to enable bare returns of component trees from functions."""
from pynecone.components.component import Component
class Fragment(Component):
"""A React fragment to return multiple components from a function without wrapping it in a container."""
library = "react"
tag = "Fragment"