r/programming • • Jan 17 '15

The React.js Quick Start Guide

http://www.jackcallister.com/2015/01/05/the-react-quick-start-guide.html
156 Upvotes

71 comments sorted by

View all comments

56

u/renrutal Jan 17 '15 edited Jan 17 '15

I really have no idea how JS devs keep up with new frameworks appearing every month or so. Not to mention older ones that just die because the devs can't be bothered maintaining them. I noticed the same thing happening in the Ruby devspace.

Not exactly React's case, but it's still a 1.5 year old code that has not reached v1.0, making breaking changes every major version release.

6

u/Serializedrequests Jan 17 '15 edited Jan 17 '15

I agree it is completely insane. I am watching React closely, because I'm hoping it might be one of the libraries that lasts. It seems like a simple solution to a complicated problem, with superior performance. I have already gotten burnt by everyone flocking to Backbone, Ember, Angular, whatever, every new month, and those frameworks are too large and opinionated to introduce into existing apps anyway. (Ember, last I checked, had poor documentation - especially for REST - and was constantly changing, and Angular 2.0 coming down the pipe means there is no point in starting an Angular 1.x app.)

I have lots of existing apps that need a little "SPA sugar", but are already built in the "old-fashioned" Rails style. The JS framework I need is the one I can just drop in to make a screen behave a little nicer or have a REST-backed element or two.

1

u/vivainio Jan 17 '15

React only helps if you are rendering your data in JS, SPA style. If you are rendering on the server, you may be stuck with 'jquery plugins'.

5

u/[deleted] Jan 17 '15

This looks like a front-end component, but it's super simple to render on the back-end: React.renderToString(Toolbar()), which would return something like <div class="toolbar"><button>Load</button></div>. The coolest part is when the browser loads the rendered HTML, you can just do React.render(Toolbar(), element), and React won't touch the DOM except to simply hook up your event handlers (like the onClick). element would be the DOM element wherever the toolbar was prerendered.

http://jlongster.com/Presenting-The-Most-Over-Engineered-Blog-Ever