The framework for turning ideas into webapps
- Manages client and server side.
- Things like Rails manage server side issues.
- Things like Ember & Angular provide front-end structure.
- Meteor helps out with both.
var arDrone = require('ar-drone') | |
, client = arDrone.createClient() | |
, stdin = process.openStdin() | |
, isAirborne | |
, speedFactor = 5 | |
, speeds = { | |
x: 0, | |
y: 0, | |
z: 0 | |
} |
alias gh="open \`git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
TLDR: a React component should either manage its own state, or expose a callback so that its parent can. But never both.
Sometimes our first impulse is for a component to entirely manage its own state. Consider this simple theater seating picker that has a letter for a row, and a number for a seat. Clicking the buttons to increment each value is hardly the height of user-interface design, but never mind - that's how it works:
/* @flow */
var React = require('react');
var Letter: React.ReactClass = React.createClass({
getInitialState: function(): any {