6 ms·
React is great but this: "I’m waiting for the day when the only way that you build UI, the only way you can build UI is with the React paradigm." is scary.
by mihaela 9y ago
React is great but this:
"I’m waiting for the day when the only way that you build UI, the only way you can build UI is with the React paradigm."
is scary.
- hellofunk 9y agoWhy is that scary? React's paradigm has changed how UIs are built in many different platforms. And you don't have to use React directly to enjoy its paradigm since other libraries and technologies have appeared that follow the same approach.
- hesarenu 9y agoI would actually like to see React paradigm used more in native development.
- polskibus 9y agoWinapi and windows forms in .net. message loop for UI programming is a very very old pattern. It was just reinvented for web and JS. I don't know if people that created react actually ever used Windows message loop.
- hesarenu 9y agoNot the loop. JSX way of declaring UI structure.
- polskibus 9y agoDo you mean like XAML and WPF ? https://msdn.microsoft.com/pl-pl/library/ms752059(v=vs.110).aspx https://msdn.microsoft.com/pl-pl/library/ms752059(v=vs.110)....
- hesarenu 9y agoI suppose so. But i do like reactjs declarative style rather code behind. Something which Flutter does as well.
- mlsarecmg 9y agoXAML is a template, it hooks into a controller via bindings. You could compare it to Angular maybe. In React a view is a function of state: const Header = ({ color, children }) => <h1 style={{ color }}>{children}</h1> // Gets transpiled into: const Header = ({ color, children }) => createElement('h1', { style: { color } }, children) <Header color="red">hello</Header> A large part of my career was about XAML/WPF/SL. I know it took me a year or more to really understand it deeply, being able to extend and do everything i wanted. I came to the same state 60 minutes into React. The pattern behind it does make many things easier. And that is an understatement. I believe that's also the main reason Microsoft itself is betting on React for cross platform and native apps as well as extension eco systems: https://github.com/Microsoft/react-native-windows https://github.com/Microsoft/react-native-windows https://github.com/Microsoft/reactxp https://github.com/Microsoft/reactxp https://developer.microsoft.com/en-us/fabric https://developer.microsoft.com/en-us/fabric
- swyx 9y agoare you referring to his comment about Electron? because React Native is a thing
- dustingetz 9y agoThat's super interesting. I dont think React is the end state; it has a couple warts that are solved in research communities. TLDR React is not efficient enough, the performance requirements of next-gen apps of 2020s is going to break React because rendering is not incremental. These warts are basically places where React departs from pure functional programming to achieve ease of use. 1) Fundamental performance problem in render-tree-pruning (it is not truly reactive, it does more work than necessary). This is not an issue today except in the most sophisticated apps, but in apps of the 2020s it's going to be a huge problem. My startup http://hyperfiddle.net/ http://hyperfiddle.net/ spends a great deal of energy trying to make React faster, it all boils down to forceUpdate which breaks the "functional programming" philosophy and makes the programming model significantly worse. 2) The solution to (1) is a reactive, spreadsheet-like programming model that generalizes to more than just the View-as-a-function, but also to the rest of the functions. React's solution injects fat "Component" instances everywhere in the view; its not actually just functions, so it breaks for the other expensive computations in the app, which will also need to be optimized in the 2020s. https://github.com/slamdata/purescript-halogen https://github.com/slamdata/purescript-halogen is the best shot i know of at solving all this; it may be 5 more years yet until this is simplified enough to become mainstream, but all-in-all the ever increasing complexity of apps means truly efficient rendering is inevitable, and React is not that.
- Vinnl 9y agoWhat makes you think 2020 apps are going to be significantly different from 2018 apps? Main difference I can think of is VR and WebAssembly, but the former is not likely to completely change the majority of websites in two years, and the latter is not restrained by React anyway.
- dustingetz 9y ago"2020s" e.g. 2028 Apps are like moores law; every 1.5 years the sophistication doubles.
- dwaltrip 9y agoDoes React with Mobx count as incremental? It only re-renders components when the data accessed by that component has changed.
- yongelee 9y agoMore naive to assume that React is the end game for UI design.
- peterhunt 9y agoTo be clear, I didn't mean that I want React-the-library baked into every platform. I do think that React-the-mental-model is superior to, say, Cocoa-the-mental-model, and by baking this model into the underlying layers of the stack we'd stand to see a lot of performance gains. Just my 2 cents though.
- sanatgersappa 9y agoTrue. fwiw, Google's new mobile UI framework Flutter uses the React paradigm.
- dbbk 9y agoSurely you're really just talking about component-oriented design, which basically every framework has now converged on - React, Angular, Ember, Vue, Riot, Polymer, etc.
- sjmulder 9y agoThese are all DOM-based UI frameworks. Perhaps it's because that's where all the action is at but I wouldn't be surprised if it were driven, for a large part, by the underlying platform.
- hesarenu 9y agoMost of those keep the html separate even many are tightly coupled.
- rakoo 9y agoI'm pretty sure it's this + 1-way data binding + data as the driver of everything + javascript as the _only_ language to describe the ui. Because those elements make for a simpler way to build UIs and I totally agree with this point of view