summaryrefslogtreecommitdiff
path: root/docs/core-concepts
diff options
context:
space:
mode:
authorGravatar François Vaux <madx+github@yapok.org> 2021-07-13 18:01:49 +0200
committerGravatar GitHub <noreply@github.com> 2021-07-13 11:01:49 -0500
commitd07f3d4186ee0ffe5acb74ebc76c15a5611268fa (patch)
tree6446538f28de8919698e568f6c3a044388620976 /docs/core-concepts
parenta05957cccfbc1d23afe3581bff00072b86e2c8f5 (diff)
downloadastro-d07f3d4186ee0ffe5acb74ebc76c15a5611268fa.tar.gz
astro-d07f3d4186ee0ffe5acb74ebc76c15a5611268fa.tar.zst
astro-d07f3d4186ee0ffe5acb74ebc76c15a5611268fa.zip
Fix astro/jsx comparison table formatting (#673)
Diffstat (limited to 'docs/core-concepts')
-rw-r--r--docs/core-concepts/astro-components.md37
1 files changed, 17 insertions, 20 deletions
diff --git a/docs/core-concepts/astro-components.md b/docs/core-concepts/astro-components.md
index e8722468a..bd0052354 100644
--- a/docs/core-concepts/astro-components.md
+++ b/docs/core-concepts/astro-components.md
@@ -205,26 +205,23 @@ 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`
-|
-| 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 |
-| Requires JS import | No | Yes, `jsxPragma` (`React` or `h`) must be in scope |
-| Fragments | Automatic top-level, `<>` inside functions | Wrap with `<Fragment>` or `<>` |
-| Multiple frameworks per-file | Yes | No |
-| Modifying `<head>` | Just use `<head>` | Per-framework (`<Head>`, `<svelte:head>`, etc) |
-| Comment Style | `<!-- HTML -->` | `{/* JavaScript */}` |
-| Special Characters | `&nbsp;` | `{'\xa0'}` or `{String.fromCharCode(160)}` |
-| Attributes | `dash-case` | `camelCase` |
+| 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` |
+| 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 |
+| Requires JS import | No | Yes, `jsxPragma` (`React` or `h`) must be in scope |
+| Fragments | Automatic top-level, `<>` inside functions | Wrap with `<Fragment>` or `<>` |
+| Multiple frameworks per-file | Yes | No |
+| Modifying `<head>` | Just use `<head>` | Per-framework (`<Head>`, `<svelte:head>`, etc) |
+| Comment Style | `<!-- HTML -->` | `{/* JavaScript */}` |
+| Special Characters | `&nbsp;` | `{'\xa0'}` or `{String.fromCharCode(160)}` |
+| Attributes | `dash-case` | `camelCase` |
### URL resolution