Declarative UI is boss. I know Andy (former UIKit team) was quoted in the intro thread but I'll do it again: >I say with confidence as a former UIKit author: React's model for the UI layer is vastly better than UIKit's. React Native is a huge deal. https://twitter.com/andy_matuschak/status/560511204867575808 If you're averse to React because of JSX, “mixing templates and views” and similar superficial “best practices…
It's too bad that you can't separate virtual dom, the innovative part of React, from the rest of React which has its warts. They should receive credit for coming up with the idea, but there are better, more reactive frameworks using virtual doms now. React shouldn't win simply because they were first and have a big company behind them.
First Impressions Using React Native
51–60 of 195 posts
Re: First Impressions Using React Native
#52> the mess of HTML and CSS get in the way of frameworks instead of helping them I totally understand where the author is coming from, and do agree... BUT there is a flip side to this, which is that HTML and CSS enable us to come up with and implement totally unique designs and interfaces. The lack of standard layout and complex "widgets" is definitely a pain in the ass, but it also enables a lot of unique-looking web…
>one can't dictate the markup exactly the way one wants because it has to be recognizable to the virtual dom as well I'm not sure what you mean. On the opposite, with React, you specify exactly the DOM (or UIView) tree you want to get. You will build different components for React web and React Native, there's no common ground between them. The platforms are too different.
Re: First Impressions Using React Native
#53I love the concepts behind React, and I agree this is a huge deal...I just wish it weren't javascript. It is a terrible language, and the languages that compile to javascript are a poor substitute (bloated code sizes, interop issues, poor runtime performance, etc). For a framework that is all about state machines (a good thing! All UIs are state machines), I hate that there aren't better ways to model them in the lan…
Websharper (http://websharper.com/) for F# is now Apache-licensed and comes with the UI.Next framework that provides a really nice reactive paradigm for creating web UIs. Unfortunately it doesn't help with mobile apps as React Native does but is still pretty good.
Re: First Impressions Using React Native
#54I love the concepts behind React, and I agree this is a huge deal...I just wish it weren't javascript. It is a terrible language, and the languages that compile to javascript are a poor substitute (bloated code sizes, interop issues, poor runtime performance, etc). For a framework that is all about state machines (a good thing! All UIs are state machines), I hate that there aren't better ways to model them in the lan…
> It is a terrible language As Douglass Crockford says, JS is a great language with some terrible parts. I don't understand why some people can't get past that.
Re: First Impressions Using React Native
#55Earlier quoted context omitted.
You can: https://www.npmjs.com/package/virtual-dom You should also check out Mithril: https://www.npmjs.com/package/mithril
I'm aware of these. But React gets all of the attention despite its warts like local component state or encouraging singletons for Flux.
Re: First Impressions Using React Native
#56The code style really reminds me of ExtJS circa 2.x (not sure what it's like now), which was pretty good at what it set out to do. However, React Native requires compiling down to various different platforms which means having to maintain multiple compatibility layers to continually shift to keep up with the native vendors. You're also pretty much stuck with proprietary distributors as well. Fun. Fun. This does look…
Looking at what HTML 5 offers and what any native platform from desktops to mobiles OS offers, I would rather stay with the disadvantages of native platforms.
> while the real momentum is going the other way (native -> Web)
Really?
Is WebGL OpenGL 4.5 compatible already?
What about those sensor APIs?
Oh, which browser is doing OpenCL and CUDA?
Web is stuck in a 90's desktop feature level and it will always be playing catch up native.
The real direction is web -> native/micro-services.
Re: First Impressions Using React Native
#57The code style really reminds me of ExtJS circa 2.x (not sure what it's like now), which was pretty good at what it set out to do. However, React Native requires compiling down to various different platforms which means having to maintain multiple compatibility layers to continually shift to keep up with the native vendors. You're also pretty much stuck with proprietary distributors as well. Fun. Fun. This does look…
I agree with the "swimming the wrong way" sentiment, in my own very biased opinion. I'm working on reapp.io to solve just that. What's funny is react actually makes it possible to make hybrid a real option.
Re: First Impressions Using React Native
#58Earlier quoted context omitted.
Virtual DOM is an implementation detail of React for web. Its true innovation is its declarative component model. You are missing the point of React. https://medium.com/@dan_abramov/youre-missing-the-point-of-r...
The "declarative component model" is not an innovation, it's an obvious approach that has been used for ages when prototyping. You can achieve the same conceptual model of your interface by just generating the entire HTML of the page and rerendering it whenever something changes. This obviously doesn't perform and has some edge cases where it breaks things (textboxes, for example), but the idea is the same as react's…
Not just that. I may be stupid but personally I find it mentally simpler to `setState` than to `flatMapLatest`. To each their own I suppose.
>React's innovation is using virtual DOM to make declarative components usable without delving into FRP.
Precisely.
>The "declarative component model" is not an innovation, it's an obvious approach [..] can achieve the same [..] by [..] obviously doesn't perform and has some edge cases where it breaks things (textboxes, for example), but the idea is the same
React is not an academic paper, it's a tool. It doesn't need to have new ideas, it needs to execute on them in a practical way. Which it does.
Re: First Impressions Using React Native
#59Layout (which is also behavior if the layout changes with the dimensions of the viewport) and animations are two things that need to be removed from CSS and implemented in JavaScript.
Re: First Impressions Using React Native
#60I think this is actually possible on the web as well. Someone could write a UI framework which runs JS in a Worker, and sends messages to the main thread, on which there is HTML and minimal JS to receive the messages and handle them.
I'm surprised this hasn't been done, or has it and I just haven't heard about it?
If you're worried about the overhead of transferring lots of messages from the Worker to the main thread, I think it can be pretty fast actually. I did an experiment with proxying WebGL that way, which is a fairly high-traffic API, with nice results,
https://blog.mozilla.org/research/2014/07/22/webgl-in-web-wo...
For something rendering a UI, message passing overhead should be reasonable, especially if the framework is smart enough to only send over what changes (like React Native does).