Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great question, and my guess:

If you build React in C++ and Rust, even if the framework is there, you'll likely need to write your components in C++/Rust. That is a difficult problem. There are actually libraries out there that allow you to build web UI with Rust, although they are for web (+ HTML/CSS) and not specifically CLI stuff.

So someone needs to create such a library that is properly maintained and such. And you'll likely develop slower in Rust compared to JS.

These companies don't see a point in doing that. So they just use whatever already exists.



Opencode wrote their own tui library in zig, and then build a solidjs library on top of that.

https://github.com/anomalyco/opentui


This has nothing to do with React style UI building.


I am referring to your comment that the reason they use js is because of a lack of tui libraries in lower level languages, yet opencode chose to develop their own in zig and then make binding for solidjs.



Where is React? These are TUI libraries, which are not the same thing


iocraft and dioxus-tui implement the React model, or derivatives of it.


Looking at their examples, I imagine people who have written HTML and React before can't possibly use these libraries without losing their sanity.

That's not a criticism of these frameworks -- there are constraints coming from Rust and from the scope of the frameworks. They just can't offer a React like experience.

But I am sure that companies like Anthropic or OpenAI aren't going to build their application using these libraries, even with AI.


and why do they need react...


That's actually relatively understandable. The React model (not necessarily React itself) of compositional reactive one-way data binding has become dominant in UI development over the last decade because it's easy to work with and does not require you to keep track of the state of a retained UI.

Most modern UI systems are inspired by React or a variant of its model.


Is this accurate? I've been coding UIs since the early 2000s and one-way data binding has always been a thing, especially in the web world. Even in the heyday of jQuery, there were still good (but much less popular) libraries for doing it. The idea behind it isn't very revolutionary and has existed for a long time. React is a paradigm shift because of differential rendering of the DOM which enabled big performance gains for very interactive SPAs, not because of data binding necessarily.


Well said.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: