Directory structure
+ myapp
|
+ build
+ node_module
+ src
|
- actions
- appAction.js
- components
- app.react.js
- dispatcher
- dispatcher.js
- stores
- appStore.js
- app.js
- bundle.js
- index.html
- package.json
- README.md
Browserify
npm install -g browserify
browserify main.js > bundle.js
Browserify —— 利用Node.js实现JS模块化加载
Flux
React
- Is it passed in from a parent via props? If so, it probably isn't state.
- Does it change over time? If not, it probably isn't state.
- Can you compute it based on any other state or props in your component? If so, it's not state.
Tweak React components in real time.
react-tools
npm install -g react-tools
jsx --watch src/ build
學習 React.js:瞭解 Flux,React.js 的架構
网友评论