https://github.com/maechabin/flux-dipatcherjs-sample
Flux dispatcher.jsでのReact実装サンプル(かなり簡易版)
https://github.com/maechabin/flux-dipatcherjs-sample
dispatcherjs facebook-flux flux flux-dispatcher react sample
Last synced: 2 days ago
JSON representation
Flux dispatcher.jsでのReact実装サンプル(かなり簡易版)
- Host: GitHub
- URL: https://github.com/maechabin/flux-dipatcherjs-sample
- Owner: maechabin
- Created: 2015-09-01T16:48:07.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-28T14:48:50.000Z (over 10 years ago)
- Last Synced: 2025-02-26T17:44:24.674Z (over 1 year ago)
- Topics: dispatcherjs, facebook-flux, flux, flux-dispatcher, react, sample
- Language: JavaScript
- Homepage: http://mae.chab.in/archives/2738
- Size: 2.02 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flux-dipatcherjs-sample
FluxでのReact実装サンプル(かなり簡易版)
できる限り最小構成になるよう心がけたが、結局Node.jsのEventEmitterも使うことになった。
[詳細]
Reactの単純なサンプルでFluxの実装を解説
http://mae.chab.in/archives/2747
## デモ
フォームに入力したテキストを表示させるだけのもの。
http://jsrun.it/maechabin/27Bi
## サンプルソース
- [flux-app.js](https://github.com/maechabin/flux-dipatcherjs-sample/blob/master/src/flux-app.js)
- [flux.html](https://github.com/maechabin/flux-dipatcherjs-sample/blob/master/sample/flux.html)
## サンプルの確認
### 1. サンプルのダウンロード
~~~
$ git clone git@github.com:maechabin/flux-dipatcherjs-sample.git flux-sample
~~~
### 2. サンプルをcloneしたディレクトリに移動して、必要なパッケージのインストール
~~~
$ cd flux-sample
$ npm install
~~~
### 3. サンプルを開く
~~~
$ open ./sample/flux.html
~~~
## サンプルの修正
### 1. 「.src/flux-app.js」を修正したら、以下のコマンドを実行
~~~
$ browserify ./src/flux-app.js -o ./dist/flux-build.js
~~~
※browserifyがシステムにインストールされていない場合は、以下コマンドでインストール
~~~
$ npm install -g browserify
~~~
### 2. サンプルを開く
~~~
$ open ./sample/flux.html
~~~