Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Fragments #9

Closed
mgeorgehansen opened this issue Jun 4, 2020 · 1 comment
Closed

support Fragments #9

mgeorgehansen opened this issue Jun 4, 2020 · 1 comment
Assignees
Labels
type: feature New feature or request

Comments

@mgeorgehansen
Copy link
Contributor

React and Preact both have "Fragment" components, which don't render any wrapper tags but simply delegate rendering to their children. This makes components more composable in contexts where tags have a nesting context (e.g. <li> must be a direct descendant of a <ol> or <ul>).

Unfortunately the TypeScript compiler does not support a custom pragma for React's <></> fragment syntax yet, though this is on track for release soon (see microsoft/TypeScript#38720), but we can provide a Fragment component in the meantime e.g. <Fragment><li>1</li></Fragment>.

@mgeorgehansen mgeorgehansen self-assigned this Jun 4, 2020
mgeorgehansen pushed a commit that referenced this issue Jun 4, 2020
Adds a new Fragment component that provides the same functionality as
React.Fragment. See issue #9 for details.

closes issue #9
@mgeorgehansen
Copy link
Contributor Author

Closed by #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant