react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| // serverEvents.js | |
| export function FOO_CREATED (event) { | |
| return { | |
| type: 'RECEIVE_FOO', | |
| payload: { | |
| foo: event.foo | |
| } | |
| } | |
| } |
| defmodule Expng do | |
| defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks] | |
| def png_parse(<< | |
| 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, | |
| _length :: size(32), | |
| "IHDR", | |
| width :: size(32), | |
| height :: size(32), |
| The MIT License (MIT) | |
| Copyright (c) 2015 Justin Perry | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| this software and associated documentation files (the "Software"), to deal in | |
| the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
| the Software, and to permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: |
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
This post shows how to use God with Resque or Sidekiq with multiple Rails applications. see https://github.com/maxivak/sidekiq-god
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
| object flatMapTest { | |
| import scala.util.{ Try, Success, Failure } | |
| println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet | |
| val intList = 1 :: 2 :: 5 :: Nil //> intList : List[Int] = List(1, 2, 5) | |
| intList.map(x => x * 2) //> res0: List[Int] = List(2, 4, 10) | |
| //intList.flatMap(x=>x*2) //type mismatch; found : Int required: scala.collection.GenTraversableOnce[?] | |
| intList.foldLeft(0)((x, y) => x + y) //> res1: Int = 8 | |
| val stringList = "eins" :: "zwei" :: "drei" :: Nil |
| var gulp = require('gulp') | |
| var browserify = require('browserify') | |
| var watchify = require('watchify') | |
| var babelify = require('babelify') | |
| var source = require('vinyl-source-stream') | |
| var buffer = require('vinyl-buffer') | |
| var merge = require('utils-merge') |
| function resize (file, maxWidth, maxHeight, fn) { | |
| var reader = new FileReader(); | |
| reader.readAsDataURL(file); | |
| reader.onload = function (event) { | |
| var dataUrl = event.target.result; | |
| var image = new Image(); | |
| image.src = dataUrl; | |
| image.onload = function () { |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).