Skip to content

Why not JSX? #2509

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

Closed
Rich-Harris opened this issue Apr 23, 2019 · 16 comments
Closed

Why not JSX? #2509

Rich-Harris opened this issue Apr 23, 2019 · 16 comments
Labels
documentation popular more than 20 upthumbs

Comments

@Rich-Harris
Copy link
Member

I really need to write this blog post, because I'm bored of answering this question

@karanganesan
Copy link

What !!! Is this even a question ??? 🙈🙈🙈

@karanganesan
Copy link

@developit would like to share some thoughts about this question ? 😅😊

@vedam
Copy link
Member

vedam commented Apr 23, 2019

directly followed by

  • why not mobx, hooks, router or what-not
  • why not css-in-js
  • why no typescript, devtools-support
  • why not fill-in-what-you're-used-to

@karanganesan
Copy link

karanganesan commented Apr 23, 2019

  • why not coffescript

because the code get even more smaller with CS removing let and even the semicolon 🎉

<script>
    name = 'world'
</script>
<h1>Hello {name}!</h1>

so that even Hello World program can get smaller 🌠

@karanganesan
Copy link

New blog post name : Why not X?

@Rich-Harris it's better this way so that it answers all questions 🖖

@kazzkiq

This comment has been minimized.

@PaulMaly

This comment has been minimized.

@akaufmann
Copy link

akaufmann commented Apr 23, 2019

@Rich-Harris
It's sad, but you can't win this fight. I think, maybe a blog post on why HTMLx is great - without mentioning JSX and why it's better than (JS)X - can achieve more? What do you think?

@vedam

why no typescript, devtools-support

No, this blog post should be: Why Typescript and good DevTools support is a high priority for us and you can expect it soon. 😉

PS: Thanks Rich, Svelte v3 brings fun back to development. Write Less Code, Get More Done 💯

@PaulMaly
Copy link
Contributor

PaulMaly commented Apr 23, 2019

Btw, about TS, you can try this: svelte-ts-preprocess. Example of usage included in monorepo.

@constgen

This comment has been minimized.

@kazzkiq

This comment has been minimized.

@constgen

This comment has been minimized.

@ryansolid

This comment has been minimized.

@pngwn
Copy link
Member

pngwn commented May 15, 2019

I don't know if Rich meant for this to become a discussion issue but I just thought I'd say: Svelte could never use JSX, it fundamentally wouldn't work because JSX is just sugar over render functions. This wouldn't work for Svelte.

When Rich does get around to writing this article, I think we'll see the main reason Svelte doesn't use JSX is technical.

@sveltejs sveltejs locked and limited conversation to collaborators May 15, 2019
@Conduitry
Copy link
Member

Hey chill out everyone. Rich being bored of answering this question does not mean let's have a bunch of opinions about something that is already settled.

@Rich-Harris
Copy link
Member Author

Happily, most people are also bored of asking it. All you have to do is wait 5 years, it turns out

@Rich-Harris Rich-Harris closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation popular more than 20 upthumbs
Projects
None yet
Development

No branches or pull requests

10 participants