This blog post series has moved here.
You might also be interested in the 2016 version.
This blog post series has moved here.
You might also be interested in the 2016 version.
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
'use strict'; | |
// vendor modules | |
import angular from 'angular'; | |
import 'angular-touch'; | |
import 'angular-animate'; | |
import 'angular-aria'; | |
import 'angular-ui-router'; | |
// app modules |
npm install -g jspm@beta
jspm init
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
Example: https://denpa.moe/~syrup/himawari8.png |
##Moving from Angular to React
For over a year I had been helping to create a production app with Angular. I was initially hugely impressed by the advantages Angular offered and invested a lot of time learning the intricacies of the framework.
Having being initially cautious about React as one of the many upcoming frameworks that wouldn't stick around I was hesitant to make the switch. However, after making the jump I've been using React for a few months now and been thouroughly impressed.
This will be a short talking explaining:
class MainApp extends Component { | |
constructor(props) { | |
super(props); | |
} | |
renderScene(route, navigator) { | |
var Component = route.component; | |
return ( | |
<Component route={route} navigator={navigator} /> | |
); |
This is a proposal for a lightning talk at the Reactive 2015 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!
React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views
This is a proposal for a lightning talk at the Reactive 2015 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!
Relay makes data fetching in React apps simpler, by letting you declare the data needs of your components instead of writing complex imperative code. React, Relay, GraphQL and the other complementary tools are changing how apps are built.