0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-24 22:46:02 -05:00

Fix astro/jsx comparison table formatting (#673)

This commit is contained in:
François Vaux 2021-07-13 18:01:49 +02:00 committed by GitHub
parent a05957cccf
commit d07f3d4186
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,15 +206,12 @@ Inside of an expression, you must wrap multiple elements in a Fragment. Fragment
`.astro` files can end up looking very similar to `.jsx` files, but there are a few key differences. Here's a comparison between the two formats.
| Feature | Astro | JSX |
| ----------------------- | --------------- | ---------------- |
| ---------------------------- | ------------------------------------------ | -------------------------------------------------- |
| File extension | `.astro` | `.jsx` or `.tsx` |
| User-Defined Components | `<Capitalized>` | `<Capitalized>` |
| Expression Syntax | `{}` | `{}` |
| Spread Attributes | `{...props}` | `{...props}` |
|
| Children | `<slot>` (with named slot support) | `children`
|
| Children | `<slot>` (with named slot support) | `children` |
| Boolean Attributes | `autocomplete` === `autocomplete={true}` | `autocomplete` === `autocomplete={true}` |
| Inline Functions | `{items.map(item => <li>{item}</li>)}` | `{items.map(item => <li>{item}</li>)}` |
| IDE Support | WIP - [VS Code][code-ext] | Phenomenal |