logoalt Hacker News

leeoniyayesterday at 10:09 AM2 repliesview on HN

> The biggest constraint when developing an efficient UI framework with good DX is JavaScript.

for perf, s/JavaScript/DOM, i think.

good DX comes from ecosystem and amount of time invested in making good tooling. JSX would be a non-starter without IDEs helping autocomplete, linting/format, syntax coloring, and webpack/babel to do the compilation.

tagged templates could reach at least the same level of DX as JSX if the community invested the resources to make that better. i'm not saying it's the right solution for a standard, but it would be way better than jsx, since tagged templates are already a standard.


Replies

localvoidyesterday at 2:01 PM

I would prefer a more expressive language like Kotlin[1] that makes it easier to work with many different domains instead of JSX hacks :)

1. https://developer.android.com/develop/ui/compose/kotlin

troupoyesterday at 11:07 AM

> JSX would be a non-starter without IDEs helping autocomplete, linting/format, syntax coloring, and webpack/babel to do the compilation.

and then you immediately go on to say this:

> tagged templates could reach at least the same level of DX as JSX if the community invested the resources to make that better.

So, tagged templates are also non-starters without IDEs helping autocomplete, linting/format, syntax coloring.

> i'm not saying it's the right solution for a standard, but it would be way better than jsx, since tagged templates are already a standard.

They are strings. There's no magic in tagged templates that somehow make them immediately better for some custom non-standard syntax compared to JSX.

You can't just plop a string containing lit's custom non-standard syntax into an IDE (or a browser) and expect it to just work because "it's tagged templates are standard".

For the purpose of templating in the browser there's literally no difference between standardizing a custom syntax based with JSX or tagged templates.

show 1 reply