Hacker News new | ask | show | jobs
by sheepscreek 27 days ago
Yes! It is hands-down, the most intuitive interface, that has successfully married declarative and imperative styles together. IMO, nothing comes close to JSX across the length and breadth of UI frameworks across all languages.
2 comments

If it is so intuitive, why then does basically every React app contain performance bugs?
What does being intuitive have to do with software optimization? You can write poorly performing code for anything. Most people never touch profilers.
The same kind of bugs don’t happen in Vue because the framework handles them for you.
Maybe fair maybe not, but definitely unrelated to how intuitive it is.
I'd argue that it's directly related. If intuitive use of a library/framework/pattern commonly causes issues, you have to keep forcing yourself to do use non-intuitive approaches to prevent them.

GOTO is also pretty intuitive.

It’s intuitive in the same way Ruby is intuitive, or C, yes, C, is intuitive.

They try to give you the vocabulary to be expressive, then get the hell out of your way. You can still shoot yourself in the foot with them, of course.

I think that has more to do with the design goals of the language. C was designed to be raw and simple, and it does that well. Ruby was designed to read almost like English prose, and it does that well. Rust was specifically designed to make it hard to shoot yourself in the foot, and it does that well too.

I don’t think that was ever a major React design goal. PropTypes helped a bit, but these days TypeScript carries most of the burden of saving developers from themselves.

Anyway, React is far from perfect. But JSX was a neat invention that alleviated the tension between

    `<div>something</div>` and

    let el = document.createElement(‘div’);
    el.innerHTML(‘something’);
Flutter, SwiftUI, Jetpack Compose: a whole lot of other platforms have been implementing React as their UI framework
No they are implementing Functional Reactive Programming, it isn't the same thing, even though common folks would say React.

https://wiki.haskell.org/Functional_Reactive_Programming

Isn't FRP more like RxJS/CycleJS?

If you ask the people who work on any of those frameworks I mentioned, they'll tell you they're taking the React style and applying it to their platforms.

I wouldn't say Compose UI/Flutter/SwiftUI are "implementing React", but if your point is that other platforms have better solutions than JSX (plus all the bloat React adds to applications), I absolutely agree.