https://github.com/wednesdaydeveloper/flux_samle
https://github.com/wednesdaydeveloper/flux_samle
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wednesdaydeveloper/flux_samle
- Owner: wednesdaydeveloper
- Created: 2016-02-14T10:31:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-14T10:32:31.000Z (over 10 years ago)
- Last Synced: 2024-12-15T01:26:18.417Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- 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
~~~