(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
| var paths = { | |
| src: [ | |
| 'src/scripts/app/**/*module*.js', | |
| 'src/scripts/app/**/*.js' | |
| ], | |
| dest: 'app/assets/scripts' | |
| }; | |
| gulp.task('scripts', function () { |
| // Lo-Dash 3.8.0 | |
| // ----------------------------------------------------------------------------- | |
| // Search String to Object | |
| // ----------------------------------------------------------------------------- | |
| // Handles many slightly malformed styles (see tests) | |
| // Expects each query to be separated by '&' | |
| // Expects each pair to be separated by '=' | |
| _.chain(queryString) // or get the current query string: window.location.search |
| class SudokuSolver { | |
| constructor(board) { | |
| this.board = board; | |
| } | |
| solve() { | |
| const index = this.board.indexOf('0'); | |
| if (index === -1) return this.board; | |
| for (let possibility = 1; possibility < 10; possibility++) { |
| var Bar1 = base => class extends base { | |
| componentWillMount(){ | |
| super.componentWillMount(); | |
| console.log('Bar1'); | |
| } | |
| }; | |
| var Bar2 = base => class extends base { | |
| componentWillMount(){ | |
| super.componentWillMount(); |
| /** | |
| * @author Juliano Castilho <julianocomg@gmail.com> | |
| */ | |
| var React = require('react'); | |
| var AffixWrapper = React.createClass({ | |
| /** | |
| * @type {Object} | |
| */ | |
| propTypes: { |
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
| var touchstartX = 0; | |
| var touchstartY = 0; | |
| var touchendX = 0; | |
| var touchendY = 0; | |
| var gesuredZone = document.getElementById('gesuredZone'); | |
| gesuredZone.addEventListener('touchstart', function(event) { | |
| touchstartX = event.screenX; | |
| touchstartY = event.screenY; |