Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
d18a977
Switch out non-ASCII quotes for ASCII versions. (#1874)
timdorr Aug 1, 2016
c9f1334
Fixed wrong unsubscribe example
wouterds Aug 2, 2016
1e46110
Merge pull request #1876 from wouterds/patch-1
markerikson Aug 2, 2016
42f0e4e
Revert "throw if getState, subscribe, or unsubscribe called while dis…
gaearon Aug 7, 2016
5914bb6
Added word for better sentence flow.
Aug 8, 2016
abf8312
Merge pull request #1886 from mikecasas/master
markerikson Aug 9, 2016
ab0724d
Fix(dependencies) Update symbol-observable requirement to 1.0.2 (#1877)
btd Aug 10, 2016
97e11e3
We ain't got no flow no mo.
timdorr Aug 10, 2016
4f8a4ed
Wording fix in AsyncActions.md (#1890)
Aug 10, 2016
52e743e
Update Gitbook version
timdorr Aug 10, 2016
9e282de
Add anchor.js support to fix hash links
timdorr Aug 10, 2016
de450c1
small wording fix
da-vaibhav Aug 15, 2016
50b97f8
Merge pull request #1897 from da-vaibhav/patch-1
markerikson Aug 15, 2016
5da0f7a
Print ES3 diff if available (#1899)
SimenB Aug 17, 2016
deb4364
Fixed a typo
papermana Aug 19, 2016
1483459
Merge pull request #1900 from papermana/master
markerikson Aug 19, 2016
772221b
Updated `npmcdn` links to `unpkg`
joaolucasl Aug 30, 2016
947e5dd
Merge pull request #1915 from joaolucasl/npmcdn-to-unpkg
markerikson Aug 30, 2016
7296d3c
Port examples to use Create React App (#1883)
gaearon Sep 2, 2016
648f833
Don't lint examples (#1928)
gaearon Sep 3, 2016
d23c748
Update WritingTests.md (#1926)
timkraut Sep 4, 2016
2a1f4c3
Correct indentation (#1906)
timkraut Sep 4, 2016
2280fec
Merge pull request #1891 from reactjs/booking-it
timdorr Sep 4, 2016
2bb29a2
Documentation for UsageWithReactRouter.md (#1929)
vnctaing Sep 4, 2016
5485b74
Add link to UsageWithReactRouter
timdorr Sep 4, 2016
3e114f8
3.6.0
timdorr Sep 4, 2016
f8ec3ef
Fix typings for `compose` function to accept single rest argument (#1…
aikoven Sep 7, 2016
e2e5d30
Update ServerRendering.md (#1933)
chanhokim Sep 7, 2016
635375d
Update UsageWithReactRouter.md (#1939)
creamidea Sep 8, 2016
9230b6e
Update UsageWithReactRouter.md
creamidea Sep 9, 2016
d465f1b
Merge pull request #1941 from creamidea/patch-2
ellbee Sep 10, 2016
72e4677
Fat arrow functions in the counter example (#1942)
ChrisJamesC Sep 12, 2016
1d41070
Merge remote-tracking branch 'reactjs/master'
ChrisJamesC Sep 12, 2016
e0168d6
Suggest Jest as default (#1943)
cpojer Sep 12, 2016
edc18fe
Merge remote-tracking branch 'reactjs/master'
ChrisJamesC Sep 12, 2016
e5e608e
Convert the async example to using fat arrow functions. (#1945)
ChrisJamesC Sep 12, 2016
d16fd07
Merge remote-tracking branch 'reactjs/master' into cc-real-world
ChrisJamesC Sep 12, 2016
b1c6569
Use more recent syntaxes in the real world example
ChrisJamesC Sep 12, 2016
a70be32
Merge remote-tracking branch 'reactjs/master' into cc-shopping-cart
ChrisJamesC Sep 12, 2016
c4e6c32
Use more ES6 syntaxes in the shopping cart example
ChrisJamesC Sep 12, 2016
35f68af
Use object assignation for getState()
ChrisJamesC Sep 12, 2016
c813282
:green_heart: fix tests failing because of missing spaces
ChrisJamesC Sep 12, 2016
4b9216b
Merge remote-tracking branch 'reactjs/master'
ChrisJamesC Sep 12, 2016
27d9a24
Use more ES6 syntaxes in the todomvc example
ChrisJamesC Sep 13, 2016
91bac67
Fixes wrong file name
Sparragus Sep 17, 2016
63ce37f
Merge pull request #1961 from Sparragus/patch-1
ellbee Sep 18, 2016
480b764
Merge pull request #1946 from ChrisJamesC/cc-real-world
ellbee Sep 18, 2016
d15d8e1
Merge pull request #1947 from ChrisJamesC/cc-shopping-cart
ellbee Sep 18, 2016
63ea618
Merge pull request #1950 from ChrisJamesC/cc-todomvc
ellbee Sep 18, 2016
9a61b49
Make one-argument arrow functions parentheses consistent
ellbee Sep 18, 2016
d5d1572
Style tweaks (#1964)
gaearon Sep 18, 2016
f56c18c
Use more ES6 syntaxes in the examples (#1965)
ChrisJamesC Sep 19, 2016
8e82c15
Fix listeners array leak (#1959)
jridgewell Sep 19, 2016
5051dbc
Clarified testing pure functions in basic docs (#1958)
sethflowers Sep 19, 2016
85e2368
add examples with Flowtype support + libdefs for redux and react-redu…
gcanti Sep 19, 2016
91c6715
Provides "how" (#1969)
gavmor Sep 21, 2016
0e73bcc
#1944 converting test suite from Mocha to Jest (#1951)
HeinrichFilter Sep 21, 2016
f508cab
Fix test (#1974)
gaearon Sep 21, 2016
d4a53a8
add link to react-lego in ecosystem.md (#1970)
peter-mouland Sep 21, 2016
b92b982
Update Actions.md (#1978)
dijonkitchen Sep 23, 2016
52910a3
Minor fix for JSDoc for createStore() arguments to avoid "missed argu…
FlyingDR Sep 25, 2016
8bac639
Add isomorphic-fetch and lodash (#1977)
mdulac Sep 25, 2016
e9659de
Remove isomoprhic-fetch (#1986)
gaearon Sep 25, 2016
ec20b4a
Update to [email protected] (#1987)
gaearon Sep 25, 2016
5502940
Update UsageWithReact.md (#1985)
cgruppioni Sep 25, 2016
d110b84
Structuring reducers page (#1930)
markerikson Sep 25, 2016
4a7a200
Typo fix
vasanthk Sep 26, 2016
bf490bd
Fix wrong link in “Splitting Up Reducer Logic” doc
remi Sep 26, 2016
25658e5
Fix typo
maarekj Sep 26, 2016
a71b2cf
Merge pull request #1993 from maarekj/patch-1
markerikson Sep 26, 2016
7691312
Merge pull request #1992 from remiprev/fix/wrong-link-in-splitting-re…
markerikson Sep 26, 2016
070507f
Merge pull request #1991 from vasanthk/master
markerikson Sep 26, 2016
5b9a5e3
Fix typos in "Using combineReducers"
markerikson Sep 26, 2016
55f1d08
Structuring reducers publish prep (#1989)
markerikson Sep 27, 2016
f2d485d
Update gitbook to use version 3.2.1 (#1997)
SamyPesse Sep 28, 2016
07e37ac
Add a URL to 'You Might Not Need Redux' (#1995)
mesaugat Sep 28, 2016
b9a6a03
Add Algolia search to docs.
timdorr Sep 28, 2016
9b9a4fe
Add missing [enhancers] argument to API reference (#2001)
mxstbr Sep 30, 2016
4f09593
Split FAQ page into individual pages per category
markerikson Oct 2, 2016
a33e604
Update FAQ: General
markerikson Oct 3, 2016
47b1b56
Update FAQ: Reducers
markerikson Oct 3, 2016
fc40719
Update FAQ: Organizing State
markerikson Oct 3, 2016
cffbbdb
Update FAQ: Store Setup
markerikson Oct 3, 2016
12a0c91
Update FAQ: Actions
markerikson Oct 3, 2016
eae2148
Docs gh 1 (#2006)
Oct 3, 2016
51f1d46
Update FAQ: Code Structure
markerikson Oct 4, 2016
f5c44c9
Update FAQ: Performance
markerikson Oct 4, 2016
e826c65
Update FAQ: React Redux
markerikson Oct 4, 2016
e7b0c9f
Update FAQ: Miscellaneous
markerikson Oct 4, 2016
5261647
Update FAQ: Add links to selector articles
markerikson Oct 4, 2016
fc5bbee
Fixed formatting in refactoring reducers example (#2011)
vaclavbohac Oct 4, 2016
9487db8
Simplify Promise nesting (#2007)
ForbesLindesay Oct 4, 2016
56568e3
Update FAQ: Add more file structure links
markerikson Oct 5, 2016
14ed09a
Merge pull request #2009 from markerikson/update-faq-page
markerikson Oct 5, 2016
bebed5d
Remove the numbers from the summary. Fix some FAQ links.
timdorr Oct 5, 2016
e2f8dd5
english word tweak
davidascher Oct 5, 2016
2fbaef2
Merge pull request #2013 from davidascher/patch-1
markerikson Oct 5, 2016
1908b4c
Update InitializingState.md (#2016)
mset Oct 5, 2016
055f005
Adding the case for nested state objects (#2014)
sabahang Oct 5, 2016
46ffc30
check for initialization call of redux
timse Oct 10, 2016
e90bf3a
Merge pull request #2026 from timse/fix-reuse-reducer-logic-example
markerikson Oct 10, 2016
fdc5088
Mark suggested adding this article here
Oct 10, 2016
dfa2f80
Merge pull request #2027 from talkol/patch-1
markerikson Oct 10, 2016
0139a96
Enable support for Mozilla Addons (#2030)
qzb Oct 11, 2016
7c5d761
Add Yarn lockfiles.
timdorr Oct 11, 2016
4574a8c
Remove eslintConfig from package.json in examples (#2035)
keik Oct 14, 2016
e6022c8
Update Root.prod.js
chuqing8086 Oct 15, 2016
9b7c4da
Merge pull request #2038 from chuqing8086/master
jimbolla Oct 15, 2016
069ca0c
Stage 2 => 3 for object spread/rest in docs
ahstro Oct 20, 2016
a8123ed
Merge pull request #2046 from ahstro/patch-1
markerikson Oct 20, 2016
a90f260
added polymer-redux binding (#2043)
elf-pavlik Oct 22, 2016
5a4dbd3
Update Motivation.md (#2042)
alextsg Oct 22, 2016
9ad45b7
Add hint key in package.json to detemine what file to load in browser…
nazar-pc Oct 22, 2016
7556731
updated reddit.com api request link (#2032)
Lukeghenco Oct 22, 2016
7286d06
Fix typo in UsageWithReactRouter.md
pkova Oct 25, 2016
354844b
Merge pull request #2050 from pkova/patch-1
jimbolla Oct 25, 2016
cd6414e
fix(webpack): change webpack config of uglifyJS plugin, which newest …
paranoidjk Nov 1, 2016
7a43845
combineReducers doc amendment (#2055)
Leonid-Yeromin Nov 1, 2016
bc3f2ae
update todos-flow example to latest versions: redux libdef (flow-type…
gcanti Nov 1, 2016
79fc59b
Fix MD syntax
timdorr Nov 1, 2016
74d6477
Another one...
timdorr Nov 1, 2016
89b0c25
Add support to compose only functions in utils/compose (#2073)
evilj0e Nov 2, 2016
a7d0d6e
Update NormalizingStateShape.md
kmerhi Nov 6, 2016
c178105
Merge pull request #2077 from kmerhi/patch-1
markerikson Nov 6, 2016
82e2569
Update Ecosystem.md
Cryrivers Nov 7, 2016
5eb714c
Merge pull request #2079 from Cryrivers/patch-1
markerikson Nov 7, 2016
c85aca9
Update Reducers.md
kmerhi Nov 7, 2016
ba98a99
Merge pull request #2083 from kmerhi/patch-2
markerikson Nov 7, 2016
9da19b9
Use the right function name for combineReducers
thomastuts Nov 9, 2016
b63898b
Add missing parenthesis
thomastuts Nov 9, 2016
cd08d1b
Merge pull request #2088 from thomastuts/patch-2
jimbolla Nov 9, 2016
63d4825
Merge pull request #2087 from thomastuts/patch-1
jimbolla Nov 9, 2016
7e26ac5
add inline redux-thunk link
Nov 11, 2016
3906787
Merge pull request #2094 from revolunet/patch-1
markerikson Nov 11, 2016
bc1fe85
Replace react-addons-update
datenreisender Nov 12, 2016
75586ce
Merge pull request #2098 from datenreisender/patch-1
markerikson Nov 12, 2016
d906cb0
Added simpler explanation in docs intro
thedgbrt Nov 13, 2016
446f7a3
updated link to documentation for ReactDOMServer.renderToString()
DanielRuf Nov 15, 2016
79561b7
Merge pull request #2105 from DanielRuf/bugfix-docs-link
jimbolla Nov 15, 2016
b15234a
improved comment, was a bit unclear
DanielRuf Nov 15, 2016
27ea7a4
Merge pull request #2106 from DanielRuf/bugfix-docs-comment
markerikson Nov 15, 2016
e61eadb
Updated new section title
thedgbrt Nov 17, 2016
78c41e4
Merge pull request #2100 from thedgbrt/improve-docs-intro
markerikson Nov 17, 2016
1157fc1
Update WritingTests.md (#2096)
kmerhi Nov 17, 2016
dcbd14a
Test against node v7 (#2078)
wbreakell Nov 17, 2016
6078afc
Remove note about ES6 since Node 6 is stable
timdorr Nov 18, 2016
df1849f
Fix missing switch statements in update examples
markerikson Nov 18, 2016
e2bdf4a
Update ServerRendering to highlight security issue
Nov 22, 2016
524da98
Merge pull request #2118 from ThisIsMissEm/patch-1
markerikson Nov 22, 2016
c8567dc
Update all reddit.com api request links (#2112)
sihaelov Nov 23, 2016
c10866a
Update argument type of reducer produced by combineReducers (#2115)
nickarora Nov 23, 2016
36b3e3e
Update ComputingDerivedData.md
Nov 24, 2016
03414f4
Merge pull request #2122 from chuckdishmon/patch-1
markerikson Nov 24, 2016
8296fe8
Add missing commas
slek22 Nov 24, 2016
fadfc97
Merge pull request #2123 from slek22/patch-2
markerikson Nov 24, 2016
b3e43c8
Provide example of initial state SSR scrub
wmertens Nov 25, 2016
e540d55
Merge pull request #2124 from wmertens/patch-2
markerikson Nov 25, 2016
d7584f7
Doc: Improve readability of Usage with React Router section
Nov 28, 2016
8e97d27
Merge pull request #2129 from kevmannn/usage-with-react-router-doc
markerikson Nov 28, 2016
5c0f1a6
Doc: clarify Navigating with React Router section
Dec 1, 2016
2fae84c
Merge pull request #2133 from kevmannn/navigating-with-react-router-doc
markerikson Dec 2, 2016
28d6b75
Updated ExampleRedditAPI.md
umanghome Dec 5, 2016
844451c
Merge pull request #2136 from umanghome/patch-1
markerikson Dec 5, 2016
8eb829b
Update ReducingBoilerplate.md
nateq314 Dec 8, 2016
a6e47e9
Merge pull request #2141 from nateq314/patch-1
jimbolla Dec 8, 2016
18a3e46
Update AsyncActions.js (#2140)
nateq314 Dec 9, 2016
3a8bb68
todos-flow example: make domain models immutable (#2143)
gcanti Dec 9, 2016
36deb84
Update server side docs to mention babel with reactjs preset (#2126)
jonathanconway Dec 9, 2016
dbf370e
Modification to docs/basics/Reducers to make imports more clear. This…
keepitreal Dec 9, 2016
eb9cd19
Code typo: returns => return
xjongar Dec 9, 2016
7677804
Merge pull request #2144 from jongar/patch-1
markerikson Dec 9, 2016
44dfc39
Simplify composer
JoeCortopassi Dec 10, 2016
3ae7c91
fixed condition where multiple bad values would be filtered out and h…
JoeCortopassi Dec 11, 2016
d198a22
fixed lint error
JoeCortopassi Dec 12, 2016
0fd3694
Merge pull request #2145 from JoeCortopassi/master
markerikson Dec 13, 2016
1857be8
Merge pull request #2147 from JoeCortopassi/filter_fix
markerikson Dec 13, 2016
7c8ad0e
Changed sub-headings so that the IDs are unique
Dec 21, 2016
80c9577
Merge pull request #2160 from chadfurman/patch-1
markerikson Dec 21, 2016
decec82
Fix filename in UsageWithReactRouter
axelclark Dec 22, 2016
750a0ca
Merge pull request #2164 from axelclark/fix-typo
markerikson Dec 23, 2016
a3a95ce
Resolve conflict and update docs.
neighborhood999 Dec 26, 2016
057847e
resolve conflict docs/glossary.md
neighborhood999 Dec 26, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/dist/**
**/examples/**
**/node_modules/**
**/server.js
**/webpack.config*.js
9 changes: 0 additions & 9 deletions .flowconfig

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_js:
- "4"
- "5"
- "6"
- "7"
script:
- npm run check:src
- npm run build
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ We are open to, and grateful for, any contributions made by the community. By co

## Reporting Issues and Asking Questions

Before opening an issue, please search the [issue tracker](https://github.com/reactjs/redux/issues) to make sure your issue hasnt already been reported.
Before opening an issue, please search the [issue tracker](https://github.com/reactjs/redux/issues) to make sure your issue hasn't already been reported.

### Bugs and Improvements

We use the issue tracker to keep track of bugs and improvements to Redux itself, its examples, and the documentation. We encourage you to open issues to discuss improvements, architecture, theory, internal implementation, etc. If a topic has been discussed before, we will ask you to join the previous discussion.

### Getting Help

**For support or usage questions like “how do I do X with Redux” and “my code doesnt work”, please search and ask on [StackOverflow with a Redux tag](http://stackoverflow.com/questions/tagged/redux?sort=votes&pageSize=50) first.**
**For support or usage questions like “how do I do X with Redux” and “my code doesn't work”, please search and ask on [StackOverflow with a Redux tag](http://stackoverflow.com/questions/tagged/redux?sort=votes&pageSize=50) first.**

We ask you to do this because StackOverflow has a much better job at keeping popular questions visible. Unfortunately good answers get lost and outdated on GitHub.

Some questions take a long time to get an answer. **If your question gets closed or you dont get a reply on StackOverflow for longer than a few days,** we encourage you to post an issue linking to your question. We will close your issue but this will give people watching the repo an opportunity to see your question and reply to it on StackOverflow if they know the answer.
Some questions take a long time to get an answer. **If your question gets closed or you don't get a reply on StackOverflow for longer than a few days,** we encourage you to post an issue linking to your question. We will close your issue but this will give people watching the repo an opportunity to see your question and reply to it on StackOverflow if they know the answer.

Please be considerate when doing this as this is not the primary purpose of the issue tracker.

Expand Down Expand Up @@ -89,7 +89,7 @@ npm run test:watch

### Docs

Improvements to the documentation are always welcome. In the docs we abide by typographic rules, so instead of ' you should use . Same goes for “ ” and dashes (—) where appropriate. These rules only apply to the text, not to code blocks.
Improvements to the documentation are always welcome. In the docs we abide by typographic rules, so instead of ' you should use '. Same goes for “ ” and dashes (—) where appropriate. These rules only apply to the text, not to code blocks.

#### Installing Gitbook

Expand Down Expand Up @@ -152,7 +152,7 @@ Please visit the [Examples page](http://redux.js.org/docs/introduction/Examples.

### Sending a Pull Request

For non-trivial changes, please open an issue with a proposal for a new feature or refactoring before starting on the work. We dont want you to waste your efforts on a pull request that we wont want to accept.
For non-trivial changes, please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.

On the other hand, sometimes the best way to start a conversation *is* to send a pull request. Use your best judgement!

Expand All @@ -166,6 +166,6 @@ In general, the contribution workflow looks like this:

Please try to keep your pull request focused in scope and avoid including unrelated commits.

After you have submitted your pull request, well try to get back to you as soon as possible. We may suggest some changes or improvements.
After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.

Thank you for contributing!
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# <a href='http://redux.js.org'><img src='https://camo.githubusercontent.com/f28b5bc7822f1b7bb28a96d8d09e7d79169248fc/687474703a2f2f692e696d6775722e636f6d2f4a65567164514d2e706e67' height='60'></a>

Redux 是個給 JavaScript 應用程式所使用的可預測 state 容器(如果你正在尋找一個 WordPress 框架,請查看 [Redux Framework](https://reduxframework.com/))。
Redux 是個給 JavaScript 應用程式所使用的可預測 state 容器。
(如果你正在尋找一個 WordPress 框架,請查看 [Redux Framework](https://reduxframework.com/)。)

他幫助你撰寫行為一致的應用程式,可以在不同的環境下執行 (客戶端、伺服器、原生應用程式),並且易於測試。在這之上,它提供一個很棒的開發體驗,例如[把程式碼即時編輯與時間旅行除錯器結合](https://github.com/gaearon/redux-devtools)。

Expand All @@ -14,8 +15,8 @@ Redux 是個給 JavaScript 應用程式所使用的可預測 state 容器(如
[![#rackt on freenode](https://img.shields.io/badge/irc-%23rackt%20%40%20freenode-61DAFB.svg?style=flat-square)](https://webchat.freenode.net/)
[![Changelog #187](https://img.shields.io/badge/changelog-%23187-lightgrey.svg?style=flat-square)](https://changelog.com/187)

>**新的東西!從 Redux 的作者學習它:
>[Getting Started with Redux](https://egghead.io/series/getting-started-with-redux) (三十部免費影片)**
>**從 Redux 的作者學習 Redux:**
>**[Getting Started with Redux](https://egghead.io/series/getting-started-with-redux) (三十部免費影片)**

### 推薦

Expand All @@ -28,6 +29,11 @@ Redux 是個給 JavaScript 應用程式所使用的可預測 state 容器(如
>[「這很酷,你藉由完全不做 Flux 來發明了一個更好的 Flux。」](https://twitter.com/andrestaltz/status/616271392930201604)
>André Staltz,Cycle 作者

### 在進一步使用 Redux 之前

>**也許你也可以閱讀為什麼你可能不需要 Redux:**
>**[「You Might Not Need Redux」](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)**

### 開發經驗

我在準備我的 React Europe 演講 [「Hot Reloading 與時間旅行」](https://www.youtube.com/watch?v=xsSnOQynTHs) 的時候撰寫了 Redux。我那時的目標是建立一個 state 管理 library,它只有最少的 API,但卻擁有完全可預測的行為,所以它可以實現 logging、hot reloading、時間旅行、universal 應用程式、記錄和重播,而不需要開發者任何其他的代價。
Expand All @@ -46,11 +52,11 @@ npm install --save redux
```

這裡假設你是使用 [npm](https://www.npmjs.com/) 作為你的套件管理器。
若不是的話,你可以[在 npmcdn 取得這些檔案](https://npmcdn.com/redux/)並下載它們,或是將套件管理器指向它們。
若不是的話,你可以[在 unpkg 取得這些檔案](https://unpkg.com/redux/)並下載它們,或是將套件管理器指向它們。

最常見的是人們將 Redux 作為 [CommonJS](http://webpack.github.io/docs/commonjs.html) 模組中的一個 collection 使用。當你在 [Webpack](http://webpack.github.io)、[Browserify](http://browserify.org/) 或 Node 環境中 import `redux` 時就能取得此模組。若你願意冒風險使用 [Rollup](http://rollupjs.org),我們也同樣支援它。

如果你不想使用模組 bundler 也沒關係。`redux` npm 套件的 [`dist` 資料夾](https://npmcdn.com/redux/dist/)包含了已編譯之 production 與 development 的 [UMD](https://github.com/umdjs/umd) build。你可以不透過 bundler 直接使用它們,也因此它們與許多熱門的 JavaScript 模組 loader 及環境相容。舉個例子,你可以將一個 UMD build 作為 [`<script>` 標籤](https://npmcdn.com/redux/dist/redux.js)放入網頁中,或[透過 Bower 進行安裝](https://github.com/reactjs/redux/pull/1181#issuecomment-167361975)。UMD build 讓 Redux 能夠作為 `window.Redux` 全域變數進行使用。
如果你不想使用模組 bundler 也沒關係。`redux` npm 套件的 [`dist` 資料夾](https://unpkg.com/redux/dist/)包含了已編譯之 production 與 development 的 [UMD](https://github.com/umdjs/umd) build。你可以不透過 bundler 直接使用它們,也因此它們與許多熱門的 JavaScript 模組 loader 及環境相容。舉個例子,你可以將一個 UMD build 作為 [`<script>` 標籤](https://unpkg.com/redux/dist/redux.js)放入網頁中,或[透過 Bower 進行安裝](https://github.com/reactjs/redux/pull/1181#issuecomment-167361975)。UMD build 讓 Redux 能夠作為 `window.Redux` 全域變數進行使用。

Redux 的原始碼由 ES2015 撰寫而成,但是我們預先編譯了 CommonJS 及 UMD build 兩種 ES5 版本,讓它們可以運作於[任何現代的瀏覽器](http://caniuse.com/#feat=es5)。你不必使用 Babel 或模組 bundler 即可[開始使用 Redux](https://github.com/reactjs/redux/blob/master/examples/counter-vanilla/index.html)。

Expand Down Expand Up @@ -102,7 +108,7 @@ function counter(state = 0, action) {
// 它的 API 是 { subscribe, dispatch, getState }。
let store = createStore(counter)

// 你可以手動的去訂閱更新,或是使用跟你的 view layer 之間的綁定
// 在 response state 改變時,你可以使用 subscribe() 來更新你的 UI
// 通常你會使用一個 view 綁定 library(例如:React Redux),而不是直接 subscribe()。
// 然而也可以很方便的將目前狀態儲存在 localStorage。
store.subscribe(() =>
Expand Down
1 change: 1 addition & 0 deletions SUMMARY.md
18 changes: 13 additions & 5 deletions book.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
{
"gitbook": "2.4.3",
"gitbook": ">=3.2.1",
"title": "Redux",
"structure": {
"summary": "docs/README.md"
},
"plugins": ["edit-link", "prism", "-highlight", "github", "anker-enable"],
"plugins": ["edit-link", "prism", "-highlight", "github", "anchorjs", "algolia"],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/chentsulin/redux/tree/new-doc-zh-tw",
"label": "Edit This Page"
},
"github": {
"url": "https://github.com/chentsulin/redux/"
},
"algolia": {
"index": "redux-docs",
"applicationID": "BC2QB3G2G4",
"publicKey": "75eb88bb56d8cf8d17b6366a2c8e5fcd",
"freeAccount": "false"
},
"theme-default": {
"styles": {
"website": "build/gitbook.css"
}
}
}
}
9 changes: 9 additions & 0 deletions build/gitbook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.book-summary ul.summary li span {
cursor: not-allowed;
opacity: 0.3;
}

.book-summary ul.summary li a:hover {
color: #008cff;
text-decoration: none;
}
Loading