3 ms·
> Doesn't state grow unmanageably large for complex GUIs? Yes, and there are various ways to make this less of a problem. Still, React generally favors explici
by mercer 8y ago
> Doesn't state grow unmanageably large for complex GUIs?
Yes, and there are various ways to make this less of a problem. Still, React generally favors explicitly passing props down the component hierarchy, keeping the actual UI bits pure functions and composing them in various ways that is typical of FP.
> I'm not sure about that. Take a look, both projects are much older: https://github.com/dotnet/reactive https://github.com/dotnet/reactive https://reactiveui.net/ https://reactiveui.net/
Perhaps I should've specified that React, as a very popular 'GUI' library, is much more functional than many of the very popular libraries that came before it.
Anyways, my point was not that it's the first of its kind, or 'fully' FP, but rather that it's an example of how FP-style UI libraries can be a good solution, and even be popular because they're less OO in nature.
- Const-me 8y ago> it's an example of how FP-style UI libraries can be a good solution On the lower level, FP approach indeed sometimes causes much cleaner architecture, even for GUI code. My point is, there’s no good alternatives at higher levels, where you want to build complex systems by combining components developed by different people/companies. > and even be popular because they're less OO in nature. That’s debatable. I don’t think the main reasons why React is popular are technical ones. Facebook is popular, and half year ago it’s market cap exceeded $600B. It’s $392B now but still it’s a huge company with 2.2B monthly active users. Many people want to achieve such success and view their technology as a silver bullet. P.S. I’d like to add that OOP and FP are almost completely orthogonal. Here’s a good article about OOP in FP languages: https://medium.com/@gaperton/let-me-start-from-the-less-obvious-thing-7f49e87a45ca https://medium.com/@gaperton/let-me-start-from-the-less-obvi... And many traditionally OOP languages adopted a lot of FP stuff: C#, JS, to lesser extent even C++ have now a lot to offer for functional-style programming.