エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
テストを考慮した singleton の ES6 export
テスト時の singleton を避けたい export facebook/flux のサンプル準拠だと、Store や Dispatcher が s... テスト時の singleton を避けたい export facebook/flux のサンプル準拠だと、Store や Dispatcher が singleton でテストを書きづらいことがあるので、普段使う singleton インスタンスと、テストで使う class オブジェクトを両方 export した。 import AppDispatcher, {Action, Payload} from '../dispatcher/AppDispatcher'; import * as Events from 'events'; const CHANGE_EVENT = 'change'; // 生クラスの export export class AcmeStore extends Events.EventEmitter { dispatchToken: string; construc



2015/09/11 リンク