7 ms·
Don't React (Presentation - Use arrows to navigate)
- poseid 12y agoit often depends on the size of your team or projects, if a certain technology makes sense. would be interesting to hear more about projects that "failed" with React. So far, I have not heard many people who failed.
- Infinitesimus 12y agoAll this links to is a page that does nothing (tested on FF and Chrome). Is there a point this is trying to make? The link itself is meaningless. If I am missing something, kindly let me know...
- keeran 12y agoIt's built in some presentation framework that requires you to press spacebar to progress. Annoying :)
- Infinitesimus 12y agoThank you! It would be very useful to have a simple "use arrow keys to navigate" text somewhere on the page. Just noticed that there's a "next" arrow visual indicator at the bottom right (not very visible due to color choices)
- kyberias 12y agoIt's the first slide of the slidedeck you're looking at. Press right arrow or find the link at the bottom-right of the page.
- deleted 12y ago[deleted]
- clinth 12y agoIt's a slideshow, probably intended to accompany a presentation. I used my right and left arrow keys to navigate.
- deleted 12y ago[deleted]
- davidy123 12y agoAlways view source. (=
- coldtea 12y agoIt has an increased barrier to entry to sort out those capable of reading it -- namely, being familiar with web slideshows and knowing to press the right arrow...
- F_Catalan 12y agoI have been programming for 30 years, 19 on the Web. I tried to learn Angular and Ember and failed, more than once. Earlier this year I had to prototype a fairly complex single page app and was severely time constrained. I tried React and succeeded beyond both my expectations and those of the client. I am in fact itching for a chance to use it again.
- jcromartie 12y agoThis is precisely my experience. It might have a slightly odd API, but React is an extremely sharp tool to have in your toolbox.
- marrs 12y agoYeah, same here, (not the 30 years part, the React FTW part) and for me the virtual DOM is the least cool thing about it. Separation of props and state is what I lust over. Anyway, where I live React isn't getting noticed; it's Angular that's all the rage, so maybe the author is fighting the wrong enemy.
- yogthos 12y agoIf you feel adventurous give Reagent http://reagent-project.github.io/ http://reagent-project.github.io/ a shot. :)
- conqrr 12y agoI agree to the React bit. I have been trying to get past building Todo apps with Angular and Ember but didnt succeed. React somehow seemed more natural and easier to grasp the whole concept rather than the complex stuff and steep learning curve of Angular.
- snarfy 12y agoDon't break the web with your presentation framework. Since you do, I cannot take anything you say about web development seriously.
- delinka 12y agoI had to read your comment to understand that there was more content than the title. Indeed I wish people would stop breaking the web is all the myriad ways that they do.
- totallymike 12y agoThe whole web? It's all broken now? Better get a broom...
- jcromartie 12y agoA note in the title would help people know that this is a reveal.js presentation, and you need to hit space/arrow/pagedown to continue.
- skrebbel 12y agoWow, what an aggressive way to promote your own little open source app. I fully agree: of course React gets a lot wrong, being a pioneer and all. The way JS often goes, I bet one of the many alternatives that pop up actually will turn out like something. But attacking it like that isn't going to get you many friends.
- Kiro 12y ago> Wow, what an aggressive way to promote your own little open source app. Yeah, makes me not want to try it. This guy should let someone else handle the marketing.
- toolz 12y agoMaybe his marketing strategy was to only draw in people who use technology based on the merits of said technology and purposefully alienate the people who need an emotional connection to be convinced? I can certainly see the merits of trying to gain pragmatic mind share first before the buzzword technology crowd joins in and makes things more complicated.
- mcintyre1994 12y ago> Reactive Programming is an Enlightened Path to Programming Utopia Yet to be Grokked By Mere Humans Is this slide a joke I don't get? The whole presentation seems to focus on terminology and buzzwords more than discussing merits as far as I can tell. EDIT: The authors commented and I'm going to assume this is an example of missing context.
- jackhoy 12y agoI've had very good experiences with React over the last year but was curious to find out what the community thought of the criticism here and if anyone has experience with the alternative promoted https://github.com/Matt-Esch/virtual-dom https://github.com/Matt-Esch/virtual-dom
- danr4 12y agoOkay, so React is not fully reactive. But to say people shouldn't use it because it's not reactive? because it abstracts virtual-dom? because it should be more reactive-friendly?! Seems like the author was offended they said they are reactive, and made a non-informative presentation, that comes off as a rant because of the rising popularity. Edit: looking at his Cycle framework's "Why?" on github, besides the part of 'Rendering separated from View' (arguably, you could say that React's render returns React elements which are virtual-DOM elements equiv), you can use the same approach with React. My current project's component almost never update themselves, except minor UI changes, which is understandable. apart from that, all the data flow comes from above, and my components change according to it. oh and it's immutable (immutable-js another great fb lib). That's the thing about React, there's quite a diversity in approaches for handling data, events, user actions, etc.
- Kiro 12y agoHe makes a weak case by focusing on the terminology. Quibble if you ask me.
- kuni-toko-tachi 12y agoIts not hairsplitting, maybe you read the FRP papers by Conal Eliot.
- platz 12y ago"Reactive" architecture and "Functional Reactive Programming (FRP)" are totally different things.
- kuni-toko-tachi 12y agoActually you are wrong. Follow him and others on twitter and you will see that they are some of the most forward thinking people on these types of frontend technologies. om and elm.are the future, which is functional and immutable. React is the gateway to those technologies, which have a long and strong academic foundation. The days of hacking together things on the frontend are over, more sound approaches are needed, and those developers who embrace them will have their pick of jobs and a fistful of cash.
- Kiro 12y agoDon't Cycle.
- kuni-toko-tachi 12y agoPeople are really missing the point here. Follow staltz on twitter, he really knows his stuff. React is very good, however it missing a few key things that would make it awesome and more consistent - namely compositional event processing. Where React falls short from perfect is by using imperative code for its lifecycle functions. He's not bashing React, he's educating you about an even better way. If you care about frontend development it would be wise to pay attention.
- aikah 12y ago> He's not bashing React I quote him > React sucks How do you call it? a constructive criticism ?
- kuni-toko-tachi 12y agoIf you look at the source code of React vs Mercury you might agree with him. Sucks is a strong word, however. He's passionate about this stuff because there is a very simple mathematics to frontend development (both declarative UI and immutable state as a function of mutational events) that has been hiding in academic papers and haskell minds that is now coming to the forefront. There is a better way, and it can reasoned about much better than other approaches.
- crossre 12y agoYou mean jQuery I suppose?
- kuni-toko-tachi 12y agoNot even the same things. I love React, use it everyday, however from a denotional semantic standpoint it is impure. view m0 = r0 view (m1 = handler e0 m0) = r1 view (m2 = handler e1 m1) = r2 This is the essence of MVC. Mathematically pure and beautiful. React and Flux are so close to this conceptually, but fall far short of it in actuality. View is a function of state. State is an argument to view, and should not be mated to view in any other way except as a function call argument to the view - point free preferably. If you look at the source code of React, there is an important object called Transaction. Transaction is basically AOP. AOP is not needed in JavaScript! Transaction reinvents functional composition. That is why things like Mercury, Mithrill, and Cycle are better,smaller, easier to read and reason about. I love React, but it is a gateway to an even brighter future. Rejoice that the days of blind monkeys (myself included) writing UI code is coming to an end.
- aikah 12y ago> React sucks If it sucked nobody would be using it.
- rjberry 12y agoPHP is pretty popular ...
- coldtea 12y ago>If it sucked nobody would be using it. Really? History is filled with stuff that sucks and people still use it. As an example, J2EE circa 2002-2006 is a good example, with everybody, including its own designers agreeing now that it sucks hard. And yet it was widely used in the enterprise. Your comeback to the other commenter is even more illogical. He points to PHP (as an example of something arguably sucky that people do use) and you respond that "PHP is not a Javascript framework". So? Did you really meant your original statement ("If it sucked nobody would be using it") as something that only holds for JS frameworks (and not also for things like programming languages or libraries)?
- ryanackley 12y agoHe implies that Grunt is dead on the first slide. Well don't I feel stupid since I still use it. I guess it's not cool anymore? I missed the memo. Wait, maybe I'm not cool? What do the cool kids use now instead of Grunt?
- arcosdev 12y agoMaybe they use Gulp. I don't even know anymore...
- hackerboos 12y agoBroccoli, Gulp, Mimosa.
- rralian 12y agoWe use make.
- ep103 12y agoSeriously, is no one using Grunt? I know there was a backlash at all the Grunt like tools that came out at the time, but I assumed it was still useful and regularly in use / updated.
- malkia 12y agoI use sudo, at least it helps in the morning with breakfast.
- tomconroy 12y agoMake.
- arcosdev 12y agoSo...is he basically saying it should be more like Angular?
- kuni-toko-tachi 12y agoInstead of the down voting nonsense, read this: http://computationallyendowed.com/blog/2014/07/20/reactive-mvc.html http://computationallyendowed.com/blog/2014/07/20/reactive-m... Basically: view m0 = r0 view (m1 = handler e0 m0) = r1 view (m2 = handler e1 m1) = r2 Or just down vote and learn nothing.
- colinramsay 12y ago"Basically"? I'm finding it difficult to answer your post with anything other than incredulity. Either way this post doesn't negate the fact that the attitude presented in the OP pretty much stinks.
- kuni-toko-tachi 12y agoChrist almighty, this is pathetic. Did you read the link?
- colinramsay 12y agoYes. Does it negate the bad attitude of the OP's presentation (no)? An attitude that you seem to share?
- kuni-toko-tachi 12y agoI was excited to see cyclejs show up in HN, because it is a brilliant continuation of the React virtual DOM paradigm. How he presented his material is not revelent to me since the information is so valuable. However, instead of focusing on that information, folks want to focus on their feelings and other foolishness. I'm too old for that nonsense. This is extremely valuable information for people who like frontend development. I hope people can gain something from it without get lost in the weeds of internet circlejerks.
- deleted 12y ago[deleted]
- dsego 12y agoI was about to start a small hobby project with kefir.js and react. Looks like I need to take a look a this too. Anybody have any experience with FRP libs? How do RxJS, lazy.js, bacon.js, kefir.js and others compare?
- coding4all 12y agoClearly the author has never heard of ClojureScript's Om.
- hackerboos 12y agoHow does Om not suffer from the same problems? It's just an Clojurescript interface to React.
- coding4all 12y agohttps://gist.github.com/runexec/6efb322f29fc790a98a1 https://gist.github.com/runexec/6efb322f29fc790a98a1
- jeremiep 12y agoOm is not an interface to React but rather React is the backend to Om. I wouldn't use React out of the box, for pretty much the very same reasons outlined in the slides.
- hackerboos 12y agoQuoting the github README: Om: A ClojureScript interface to Facebook's React.
- Gonzih 12y agoI would suggest Reagent as a good example of simple API on to p of React
- coding4all 12y agoEasier to learn doesn't quite mean "simple". I prefer Om not just because I took the time to learn it, but because it makes more sense once you do.
- Gonzih 12y agoCan you explain? I don't see lot of sense in om's complexity personally, but maybe I'm wrong.
- dyadic 12y agoI see a lot of misappropriation of terminology (in this case, "reactive") in libraries and documentation. But unfortunately this is something that has been going on for a long time and it's an impossible task to stop and, check and verify everything that is released. However, if this is the case, then the criticism here against React shouldn't be that they're not reactive, but that they've used "reactive" wrong in their documentation. Like other commentors, I also don't like the message in the slides and do not think that criticizing a competitor is a good form of marketing. But, I do think we should remember that it's hard to get the full context from slides and to not judge too quickly.
- tel 12y agoReact always feels to me to big a huge compromise between a nice statefree dataflow solution for UIs and "getting Javascripters en masse to actually use the damn thing". The entire existence of the state API is a highly visible example of this. It reminds me a lot of Gabriel's divide between the New Jersey approach versus the MIT approach---React is far more viral in its current form, but better technology certain lives further down the path. I went to the Boston React meetup a few nights ago to hear Pete Hunt speak about React. He was a wonderful speaker and described nicely how React learned some of the same lessons that REST did making it superior to basic message passing and bloated/leaky distributed object mechanisms (blech). He also projected a very pragmatic POV from the React dev team---they want things to be right, but they also want things to be functional in the perspective of the way most applications are built today. I was eager and jumped on some of the problems he suggested the React time was facing trying to integrate something like animation into React. At this point we jump from a sequence of instantaneous updates to a more game-like continuous redraw effort. Pete mentioned that the current effort here was to try to use technology like RxJS observers to get more reactivity and this seems aligned with the OP here. Personally, I think animation lives most nicely in the domain of continuous time, "true" FRP which is mostly ignored by the current wave of Javascript FRP libraries. Perhaps for good reason since most modern implementations ideas of (again, "true") FRP are challenging to implement efficiently and the semantic model is probably far too large (Zeno processes, difficulty with infinitesimal delay). But the advantage of FRP is that you can specify things like animation independently of the icky details like event passing and sampling rate and let those be determined at a later time when your FRP eDSL gets compiled into a more refined event-passing network. In other words, FRP languages hide a vast number of irrelevant and muddying details in a way that has a consistent denotation and can (perhaps!) be compiled efficiently into a push/pull message passing network.
- kuni-toko-tachi 12y agoExcellent and well said.
- deleted 12y ago[deleted]
- seanmcdirmid 12y ago
- grandalf 12y agoHey everyone, don't get carried away by the tone of the slides. There is some good stuff in there.
- staltz 12y agoPresentation author here. I should have taken this down before it popped up on HN or elsewhere. The video of this presentation is worth watching, because it's tongue-in-cheek through-out. But the slides are not worth reading, otherwise people take it seriously like it's happening here now. Cycle isn't the solution to everything, it's just one guy's ongoing experiment.
- lhorie 12y agoDo you have a link to the video?
- yogthos 12y agoI find that Reagent http://reagent-project.github.io/ http://reagent-project.github.io/ addresses many of the issues. For example, all components can be described as simple data structures. Components communicate via atoms that notify components that their state changes. This means that two components retain control over their state and can decide how they wish to react to the change in the atom.
- joelhooks 12y agoThe slides read great, and the concepts are important. It's something I'm personally intrigued by[1]. Very interested in Cycle and your experiments. Thanks! [1] https://github.com/joelhooks/react-rxjs-angular-di-todomvc https://github.com/joelhooks/react-rxjs-angular-di-todomvc
- ogig 12y agoMeteor should be metioned here. It embraces both virtual dom and reactivity [1]. When FRP, Angular, Ember or React are talked about I always feel Meteor is unfairly treated and underrepresented. Meteor imperative style and the patterns it provides are a joy to work with. If you are interested into FRP from a web development perspective Meteor is a good framework to experiment with. [1] http://docs.meteor.com/#/full/reactivity http://docs.meteor.com/#/full/reactivity
- lhorie 12y agoDisclaimer: I wrote Mithril (one of the vdom frameworks mentioned in the presentation) I like the idea of reactive programming, but it tends to add a lot of indirection. This is theoretically desirable, but not necessarily pragmatic in reality. A lot of frontend code in the wild is of the throw-away-in-a-few-years nature and it's hard to get mindshare among developers if they're required to learn stuff that feels academic when all they really care about is getting stuff shipped the next day. Being able (forced?) to tightly couple a controller and a view in Angular is one reason a lot of people like it. I was giving a workshop on FP recently, and you'd be surprised at the number of people who still don't grok `filter`. FRP is still way over a lot of people's heads. Hopefully the industry will warm up more to the concept as React, Mithril, Meteor, etc get more popular. @staltz WRT Cycle.js itself: I took a look at the TodoMVC example and was surprised to see intents reading data from DOM element data attributes (e.g. https://github.com/staltz/todomvc-cycle/blob/master/js/intents/todos.js#L7-21 https://github.com/staltz/todomvc-cycle/blob/master/js/inten... ). How does one go about doing non-string parameterized intents? For example, I often need to reference an entity from an event handler and searching for it in a collection by ID seems wasteful. In Mithril, for example, handlers can receive parameters as inputs either via closures from the view or via partial application (i.e. Function::bind). This is especially useful for event handlers that deal with relationships between two or more different entities. Is there a similar mechanism in Cycle.js?
- discreteevent 12y agoIf they don't grok filter then they cannot even interact with a relational database at the simplest level (a select, where). I think there is a certain level below which you are not obliged to dumb it down further.
- lhorie 12y agoSure there are those who get by w/ Google/StackOverflow/copy+paste (and hey, everyone has to start somewhere), but also remember that not everyone is a full stack dev. Lots of people make a living programming exclusively on the frontend. There are also those that understand the concept of filtering at a basic level when reading tutorials about it, but still write for/if loops when it comes to producing actual code and it doesn't occur to them that it's possible to take the anonymous function out of the filter() call and give it a name to start building up a compositional foundation in their codebases. My point though is that the benefits of FRP are somewhat out of line with the types of problems that people face in the real world.
- zghst 12y ago> Testing worse, through DOM If you're writing proper tests for React, you don't test directly through the DOM. Using Jest you can mock the DOM to test parts of your component. In my view, a component should not contain everything, only the most essential parts to get a working example of how it functions. Reusable/general functionality is pulled in from mixins or other js modules, which should be testable, without the structure of React, on its own. > Cannot have post processing steps This is incorrect, you can create a post processing step in React with a parent component. I used this for a pointer events polyfill in React where it replaces `onPointerEvent` with the appropriate mouse or touch event on a child component. > Cannot delay rendering after state/props change You can delay a render by returning false from shouldComponentUpdate, and when you get to the point where you want to render you can use this.forceUpdate(). That being said, React is somewhat misleading as far as Reactive programming goes.
- mjohn 12y agoInteresting, I've been playing with React/Flux a bit lately. I enjoy them more than other JS frameworks, but agree it doesn't feel like it's quite right yet. This blog post from the same author gives a bit more detail than the presentation slides: http://futurice.com/blog/reactive-mvc-and-the-virtual-dom http://futurice.com/blog/reactive-mvc-and-the-virtual-dom Looking forward to seeing the presentation video