http://inside.pixiv.net/entry/2015/04/27/170944
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
If you’re using React 0.13's shiny new class syntax… class MyComponent extends React.Component { }…remember, there is no auto-binding. class MyComponent extends React.Component { componentDidMount() { // `this` won't be what you think it is MyFluxStore.listen(this.onChange); } onChange(state) { // this is not this :( this.setState(state); } }An easy way to fix this is to use Function#bind. class M
Promiseもコールバックも使ってないのにDispatcherのwaitForで順番の制御ができる。どういう事なのか気になったので調べた。 Reactはなんとなく使えるようになった気がしたので、fluxでやろう、StoreとかActionとかどう書くんだと調べてて、とりあえずflux npmというFacebookの中の人によるfluxアーキテクチャの説明とDispatcherが一つだけ入っているnpmを見ていた。 Dispatcherは使ってみた感じ、イベント名が無いEventEmitterみたいな感じで、登録順に実行される。 flux = require 'flux' Dispatcher = new flux.Dispatcher Dispatcher.register (action) -> console.log "1 - #{JSON.stringify action}" Di
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く