Skip to content

Instantly share code, notes, and snippets.

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.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@teppeis
teppeis / gist:a48558a71a98d6bee6c9
Last active April 8, 2017 11:37
最近のFlowtype事情とReact+Flowtype連携

最近のFlowtype事情とReact+Flowtype連携

2015/01/15時点の情報です。

最近のFlowtype事情

v0.1.3が計画されてるけど、initial releaseのv0.1.0からはbugfixや細かな修正がほとんどで、大きな進化はしてない。 コミットもあまり活発ではない。 もしかしたら、Facebook社内でprivateブランチを育てていてまとまったところで出してくるのかも。 (JS等に比べて)開発者人口の少ないOCaml実装というのも、プルリクが集まりにくくOSS的な加速的進化が起きにくい原因かもしれない。

プログレッシブ・エンハンスメントで未来をデザインする

この記事はFrontrend Advent Calendar 2014 - Qiita 10日目の記事です。

プログレッシブ・エンハンスメントは単にJavaScriptをオフにしているユーザのサポートをするか、否かという意味ではありません。
(ちなみに、Gov.ukによると1.1%のユーザはJavaScriptを利用していない、もしくは利用できないという調査結果となっています)
もちろん、古いブラウザに対するアプローチだけでもありません。

デスクトップ、ラップトップ、スマートフォンやタブレット、そしてスマートウォッチなど、今では多くのデバイスにブラウザが搭載されています。

@jkrems
jkrems / generators.md
Last active February 24, 2020 19:09
Generators Are Like Arrays

In all the discussions about ES6 one thing is bugging me. I'm picking one random comment here from this io.js issue but it's something that comes up over and over again:

There's sentiment from one group that Node should have full support for Promises. While at the same time another group wants generator syntax support (e.g. var f = yield fs.stat(...)).

People keep putting generators, callbacks, co, thunks, control flow libraries, and promises into one bucket. If you read that list and you think "well, they are all kind of doing the same thing", then this is to you.

@nicolashery
nicolashery / gulpfile-react-jshint.js
Created October 20, 2014 17:06
Gulpfile for JSHint on a React app with watch, JSX error logging, and cache
var gulp = require('gulp');
var react = require('gulp-react');
var jshint = require('gulp-jshint');
var cache = require('gulp-cached');
var jsFiles = [
'src/**/*.js',
'test/**/*.js',
'*.js'
];
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@emcmanus
emcmanus / NSDate+TimeAgoInWords.swift
Created October 3, 2014 22:00
A Swift port of Rails' time_ago_in_words.
//
// NSDate+TimeAgoInWords.swift
//
// A Swift port of Rails' time_ago_in_words.
// Created by Ed McManus for Yardsale on 9/30/14.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@everpeace
everpeace / Why People Want Microservices.md
Last active November 8, 2022 10:37
マイクロサービス化が進む背景について考えてみた

マイクロサービス化が進む背景について考えてみた

最近マイクロサービスって流行ってますよね。バズってると言ってもいいくらい。

個人的には、「マイクロサービスって結局何なの?」とか、「SOAと何が違うわけ?」とかいう議論は苦手です。

でも「なんでみんなマイクロサービスで作りたいのか?なんでマイクロサービスで作られるサービスが多いのか?」にはすごく興味があるんです。

僕は今、シリコンバレーにある日系SIerの小さな子会社で駐在員をやっていますが、このエリアに居ると、とにかく最近、

「サービス全体が、独立した小さなサービスの集合で構成されるようになってきている」

@remino
remino / compression.rb
Created September 3, 2014 03:58
Ruby on Rails: Minify HTML, CSS, & JS, and compress with gzip https://remino.net/rails-html-css-js-gzip-compression/
# config/initializers/compression.rb
Rails.application.configure do
# Use environment names or environment variables:
# break unless Rails.env.production?
break unless ENV['ENABLE_COMPRESSION'] == '1'
# Strip all comments from JavaScript files, even copyright notices.
# By doing so, you are legally required to acknowledge
# the use of the software somewhere in your Web site or app:
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration