Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
509c9ab
Remove jest-cli.
timdorr Feb 15, 2018
8b25298
Move jest to dev deps.
timdorr Feb 15, 2018
ac7cd32
Update deps and rollup config.
timdorr Feb 15, 2018
2112d45
4.0.0-beta.2
timdorr Feb 15, 2018
b307091
New documentation on the upcoming GitBook (#2837)
SamyPesse Feb 16, 2018
4fbe27f
Update Footer to use to use VisibilityFilters from actions (#2840)
matiasleidemer Feb 18, 2018
f310026
Don't scope pages to docs (#2843)
SamyPesse Feb 18, 2018
e6e7cc3
Update Footer to use to use VisibilityFilters from actions (#2844)
matiasleidemer Feb 19, 2018
51539fa
Fix examples and todo app with VisibilityFilters export (#2848)
matiasleidemer Feb 20, 2018
0573abc
Add links to the todo code elsewhere.
timdorr Feb 20, 2018
2f796c2
Added small summary of when to use redux (#2851)
austintackaberry Feb 21, 2018
55e77e8
Update wording for "when to use Redux"
markerikson Feb 21, 2018
721a5fa
Add a sideEffects: false flag for Webpack 4 (#2865)
timdorr Mar 3, 2018
78f31f3
Removed first person reference in README (#2871)
parse Mar 6, 2018
5531d9b
[docs] [examples] remove the open localhost cmd from examples (#2872)
raunofreiberg Mar 6, 2018
f133d61
Update Actions.md (#2873)
Mar 6, 2018
522199b
fixed broken links by removing /docs/ (#2875)
Mar 7, 2018
3925feb
Update docs contributing, now that Gitbook does the builds.
timdorr Mar 8, 2018
33c63f2
Remove validator.js suggestion (#2880)
chrisself Mar 9, 2018
d5de83b
[docs]:Fix Documentation links (#2883)
cht8687 Mar 12, 2018
ba499ae
README: Fix broken example links (#2882)
petekp Mar 12, 2018
24f3d5e
Fixed a typo in DesignDecisions markdown file (#2888)
agjs Mar 13, 2018
a556c9c
Update todos flow to follow up-to-date libdefs (#2889)
villesau Mar 13, 2018
49e4883
[todos] [refactor] improve the general style of the approach to React…
raunofreiberg Mar 13, 2018
7835281
docs(NextSteps): Next steps page - WIP (#2787)
codedavinci Mar 14, 2018
dd2844f
Remove dead link from Immutability reading list (#2891)
esbena Mar 14, 2018
b8b596e
fix code example for `generating reducers` (#2899)
seriousManual Mar 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module.exports = {
extends: 'react-app',

rules: {
'jsx-a11y/href-no-hash': 'off'
},

overrides: [
{
files: 'test/**/*.js',
Expand Down
3 changes: 3 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
structure:
readme: README.md
summary: docs/README.md
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ dist
lib
es
coverage
_book
40 changes: 1 addition & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,45 +87,7 @@ npm run test:watch

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

To install the latest version of `gitbook` and prepare to build the documentation, run the following:

```
npm run docs:prepare
```

#### Building the Docs

To build the documentation, run the following:

```
npm run docs:build
```

To watch and rebuild documentation when changes occur, run the following:

```
npm run docs:watch
```

The docs will be served at http://localhost:4000.

#### Publishing the Docs

To publish the documentation, run the following:

```
npm run docs:publish
```

#### Cleaning the Docs

To remove previously built documentation, run the following:

```
npm run docs:clean
```
The docs are published automatically when the `master` branch is updated.

### Examples

Expand Down
52 changes: 31 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,22 @@ It is tiny (2kB, including dependencies).

## Before Proceeding Further

>**Also read:**
>**[You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)**
Redux is a valuable tool for organizing your state, but you should also consider whether it's appropriate for your situation. Here's some suggestions on when it makes sense to use Redux:
* You have reasonable amounts of data changing over time
* You need a single source of truth for your state
* You find that keeping all your state in a top-level component is no longer sufficient

Yes, these guidelines are subjective and vague, but this is for good reason. The point at which you should integrate Redux into your application is different for every user and different for every application.

>**For more thoughts on how Redux is meant to be used, see:**<br>
>- **[You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)**<br>
>- **[The Tao of Redux, Part 1 - Implementation and Intent](http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-1/)**<br>
>- **[The Tao of Redux, Part 2 - Practice and Philosophy](http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-2/)**
>- **[Redux FAQ](https://redux.js.org/faq)**

## Developer Experience

I wrote Redux while working on my React Europe talk called [“Hot Reloading with Time Travel”](https://www.youtube.com/watch?v=xsSnOQynTHs). My goal was to create a state management library with minimal API but completely predictable behavior, so it is possible to implement logging, hot reloading, time travel, universal apps, record and replay, without any buy-in from the developer.
Dan Abramov (author of Redux) wrote Redux while working on his React Europe talk called [“Hot Reloading with Time Travel”](https://www.youtube.com/watch?v=xsSnOQynTHs). His goal was to create a state management library with minimal API but completely predictable behavior, so it is possible to implement logging, hot reloading, time travel, universal apps, record and replay, without any buy-in from the developer.

## Influences

Expand Down Expand Up @@ -162,14 +172,14 @@ If you enjoyed my course, consider supporting Egghead by [buying a subscription]

## Documentation

* [Introduction](http://redux.js.org/docs/introduction/index.html)
* [Basics](http://redux.js.org/docs/basics/index.html)
* [Advanced](http://redux.js.org/docs/advanced/index.html)
* [Recipes](http://redux.js.org/docs/recipes/index.html)
* [FAQ](http://redux.js.org/docs/FAQ.html)
* [Troubleshooting](http://redux.js.org/docs/Troubleshooting.html)
* [Glossary](http://redux.js.org/docs/Glossary.html)
* [API Reference](http://redux.js.org/docs/api/index.html)
* [Introduction](http://redux.js.org/introduction/index.html)
* [Basics](http://redux.js.org/basics/index.html)
* [Advanced](http://redux.js.org/advanced/index.html)
* [Recipes](http://redux.js.org/recipes/index.html)
* [FAQ](http://redux.js.org/FAQ.html)
* [Troubleshooting](http://redux.js.org/Troubleshooting.html)
* [Glossary](http://redux.js.org/Glossary.html)
* [API Reference](http://redux.js.org/api/index.html)

For PDF, ePub, and MOBI exports for offline reading, and instructions on how to create them, please see: [paulkogel/redux-offline-docs](https://github.com/paulkogel/redux-offline-docs).

Expand All @@ -179,16 +189,16 @@ For Offline docs, please see: [devdocs](http://devdocs.io/redux/)

Almost all examples have a corresponding CodeSandbox sandbox. This is an interactive version of the code that you can play with online.

* [Counter Vanilla](http://redux.js.org/docs/introduction/Examples.html#counter-vanilla) ([source](https://github.com/reactjs/redux/tree/master/examples/counter-vanilla))
* [Counter](http://redux.js.org/docs/introduction/Examples.html#counter) ([source](https://github.com/reactjs/redux/tree/master/examples/counter), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/counter))
* [Todos](http://redux.js.org/docs/introduction/Examples.html#todos) ([source](https://github.com/reactjs/redux/tree/master/examples/todos), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todos))
* [Todos with Undo](http://redux.js.org/docs/introduction/Examples.html#todos-with-undo) ([source](https://github.com/reactjs/redux/tree/master/examples/todos-with-undo), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todos-with-undo))
* [TodoMVC](http://redux.js.org/docs/introduction/Examples.html#todomvc) ([source](https://github.com/reactjs/redux/tree/master/examples/todomvc), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todomvc))
* [Shopping Cart](http://redux.js.org/docs/introduction/Examples.html#shopping-cart) ([source](https://github.com/reactjs/redux/tree/master/examples/shopping-cart), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/shopping-cart))
* [Tree View](http://redux.js.org/docs/introduction/Examples.html#tree-view) ([source](https://github.com/reactjs/redux/tree/master/examples/tree-view), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/tree-view))
* [Async](http://redux.js.org/docs/introduction/Examples.html#async) ([source](https://github.com/reactjs/redux/tree/master/examples/async), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/async))
* [Universal](http://redux.js.org/docs/introduction/Examples.html#universal) ([source](https://github.com/reactjs/redux/tree/master/examples/universal))
* [Real World](http://redux.js.org/docs/introduction/Examples.html#real-world) ([source](https://github.com/reactjs/redux/tree/master/examples/real-world), [sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/real-world))
* [**Counter Vanilla**](https://redux.js.org/introduction/examples#counter-vanilla): [Source](https://github.com/reactjs/redux/tree/master/examples/counter-vanilla)
* [**Counter**](https://redux.js.org/introduction/examples#counter): [Source](https://github.com/reactjs/redux/tree/master/examples/counter) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/counter)
* [**Todos**](https://redux.js.org/introduction/examples#todos): [Source](https://github.com/reactjs/redux/tree/master/examples/todos) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todos)
* [**Todos with Undo**](https://redux.js.org/introduction/examples#todos-with-undo): [Source](https://github.com/reactjs/redux/tree/master/examples/todos-with-undo) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todos-with-undo)
* [**TodoMVC**](https://redux.js.org/introduction/examples#todomvc): [Source](https://github.com/reactjs/redux/tree/master/examples/todomvc) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todomvc)
* [**Shopping Cart**](https://redux.js.org/introduction/examples#shopping-cart): [Source](https://github.com/reactjs/redux/tree/master/examples/shopping-cart) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/shopping-cart)
* [**Tree View**](https://redux.js.org/introduction/examples#tree-view): [Source](https://github.com/reactjs/redux/tree/master/examples/tree-view) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/tree-view)
* [**Async**](https://redux.js.org/introduction/examples#async): [Source](https://github.com/reactjs/redux/tree/master/examples/async) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/async)
* [**Universal**](https://redux.js.org/introduction/examples#universal): [Source](https://github.com/reactjs/redux/tree/master/examples/universal)
* [**Real World**](https://redux.js.org/introduction/examples#real-world): [Source](https://github.com/reactjs/redux/tree/master/examples/real-world) | [Sandbox](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/real-world)

If you're new to the NPM ecosystem and have troubles getting a project up and running, or aren't sure where to paste the gist above, check out [simplest-redux-example](https://github.com/jackielii/simplest-redux-example) that uses Redux together with React and Browserify.

Expand Down
1 change: 0 additions & 1 deletion SUMMARY.md

This file was deleted.

25 changes: 0 additions & 25 deletions book.json

This file was deleted.

138 changes: 69 additions & 69 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
# Table of Contents

* [Read Me](/README.md)
* [Introduction](/docs/introduction/README.md)
* [Motivation](/docs/introduction/Motivation.md)
* [Core Concepts](/docs/introduction/CoreConcepts.md)
* [Three Principles](/docs/introduction/ThreePrinciples.md)
* [Prior Art](/docs/introduction/PriorArt.md)
* [Learning Resources](/docs/introduction/LearningResources.md)
* [Ecosystem](/docs/introduction/Ecosystem.md)
* [Examples](/docs/introduction/Examples.md)
* [Basics](/docs/basics/README.md)
* [Actions](/docs/basics/Actions.md)
* [Reducers](/docs/basics/Reducers.md)
* [Store](/docs/basics/Store.md)
* [Data Flow](/docs/basics/DataFlow.md)
* [Usage with React](/docs/basics/UsageWithReact.md)
* [Example: Todo List](/docs/basics/ExampleTodoList.md)
* [Advanced](/docs/advanced/README.md)
* [Async Actions](/docs/advanced/AsyncActions.md)
* [Async Flow](/docs/advanced/AsyncFlow.md)
* [Middleware](/docs/advanced/Middleware.md)
* [Usage with React Router](/docs/advanced/UsageWithReactRouter.md)
* [Example: Reddit API](/docs/advanced/ExampleRedditAPI.md)
* Next Steps
* [Recipes](/docs/recipes/README.md)
* [Migrating to Redux](/docs/recipes/MigratingToRedux.md)
* [Using Object Spread Operator](/docs/recipes/UsingObjectSpreadOperator.md)
* [Reducing Boilerplate](/docs/recipes/ReducingBoilerplate.md)
* [Server Rendering](/docs/recipes/ServerRendering.md)
* [Writing Tests](/docs/recipes/WritingTests.md)
* [Computing Derived Data](/docs/recipes/ComputingDerivedData.md)
* [Implementing Undo History](/docs/recipes/ImplementingUndoHistory.md)
* [Isolating Subapps](/docs/recipes/IsolatingSubapps.md)
* [Structuring Reducers](/docs/recipes/StructuringReducers.md)
* [Prerequisite Concepts](/docs/recipes/reducers/PrerequisiteConcepts.md)
* [Basic Reducer Structure](/docs/recipes/reducers/BasicReducerStructure.md)
* [Splitting Reducer Logic](/docs/recipes/reducers/SplittingReducerLogic.md)
* [Refactoring Reducers Example](/docs/recipes/reducers/RefactoringReducersExample.md)
* [Using `combineReducers`](/docs/recipes/reducers/UsingCombineReducers.md)
* [Beyond `combineReducers`](/docs/recipes/reducers/BeyondCombineReducers.md)
* [Normalizing State Shape](/docs/recipes/reducers/NormalizingStateShape.md)
* [Updating Normalized Data](/docs/recipes/reducers/UpdatingNormalizedData.md)
* [Reusing Reducer Logic](/docs/recipes/reducers/ReusingReducerLogic.md)
* [Immutable Update Patterns](/docs/recipes/reducers/ImmutableUpdatePatterns.md)
* [Initializing State](/docs/recipes/reducers/InitializingState.md)
* [Using Immutable.JS with Redux](/docs/recipes/UsingImmutableJS.md)
* [FAQ](/docs/FAQ.md)
* [General](/docs/faq/General.md)
* [Reducers](/docs/faq/Reducers.md)
* [Organizing State](/docs/faq/OrganizingState.md)
* [Store Setup](/docs/faq/StoreSetup.md)
* [Actions](/docs/faq/Actions.md)
* [Immutable Data](/docs/faq/ImmutableData.md)
* [Code Structure](/docs/faq/CodeStructure.md)
* [Performance](/docs/faq/Performance.md)
* [Design Decisions](/docs/faq/DesignDecisions.md)
* [React Redux](/docs/faq/ReactRedux.md)
* [Miscellaneous](/docs/faq/Miscellaneous.md)
* [Troubleshooting](/docs/Troubleshooting.md)
* [Glossary](/docs/Glossary.md)
* [API Reference](/docs/api/README.md)
* [createStore](/docs/api/createStore.md)
* [Store](/docs/api/Store.md)
* [combineReducers](/docs/api/combineReducers.md)
* [applyMiddleware](/docs/api/applyMiddleware.md)
* [bindActionCreators](/docs/api/bindActionCreators.md)
* [compose](/docs/api/compose.md)
* [Change Log](/CHANGELOG.md)
* [Patrons](/PATRONS.md)
* [Feedback](/docs/Feedback.md)
* [Read Me](../README.md)
* [Introduction](introduction/README.md)
* [Motivation](introduction/Motivation.md)
* [Core Concepts](introduction/CoreConcepts.md)
* [Three Principles](introduction/ThreePrinciples.md)
* [Prior Art](introduction/PriorArt.md)
* [Learning Resources](introduction/LearningResources.md)
* [Ecosystem](introduction/Ecosystem.md)
* [Examples](introduction/Examples.md)
* [Basics](basics/README.md)
* [Actions](basics/Actions.md)
* [Reducers](basics/Reducers.md)
* [Store](basics/Store.md)
* [Data Flow](basics/DataFlow.md)
* [Usage with React](basics/UsageWithReact.md)
* [Example: Todo List](basics/ExampleTodoList.md)
* [Advanced](advanced/README.md)
* [Async Actions](advanced/AsyncActions.md)
* [Async Flow](advanced/AsyncFlow.md)
* [Middleware](advanced/Middleware.md)
* [Usage with React Router](advanced/UsageWithReactRouter.md)
* [Example: Reddit API](advanced/ExampleRedditAPI.md)
* [Next Steps](advanced/NextSteps.md)
* [Recipes](recipes/README.md)
* [Migrating to Redux](recipes/MigratingToRedux.md)
* [Using Object Spread Operator](recipes/UsingObjectSpreadOperator.md)
* [Reducing Boilerplate](recipes/ReducingBoilerplate.md)
* [Server Rendering](recipes/ServerRendering.md)
* [Writing Tests](recipes/WritingTests.md)
* [Computing Derived Data](recipes/ComputingDerivedData.md)
* [Implementing Undo History](recipes/ImplementingUndoHistory.md)
* [Isolating Subapps](recipes/IsolatingSubapps.md)
* [Structuring Reducers](recipes/StructuringReducers.md)
* [Prerequisite Concepts](recipes/reducers/PrerequisiteConcepts.md)
* [Basic Reducer Structure](recipes/reducers/BasicReducerStructure.md)
* [Splitting Reducer Logic](recipes/reducers/SplittingReducerLogic.md)
* [Refactoring Reducers Example](recipes/reducers/RefactoringReducersExample.md)
* [Using `combineReducers`](recipes/reducers/UsingCombineReducers.md)
* [Beyond `combineReducers`](recipes/reducers/BeyondCombineReducers.md)
* [Normalizing State Shape](recipes/reducers/NormalizingStateShape.md)
* [Updating Normalized Data](recipes/reducers/UpdatingNormalizedData.md)
* [Reusing Reducer Logic](recipes/reducers/ReusingReducerLogic.md)
* [Immutable Update Patterns](recipes/reducers/ImmutableUpdatePatterns.md)
* [Initializing State](recipes/reducers/InitializingState.md)
* [Using Immutable.JS with Redux](recipes/UsingImmutableJS.md)
* [FAQ](FAQ.md)
* [General](faq/General.md)
* [Reducers](faq/Reducers.md)
* [Organizing State](faq/OrganizingState.md)
* [Store Setup](faq/StoreSetup.md)
* [Actions](faq/Actions.md)
* [Immutable Data](faq/ImmutableData.md)
* [Code Structure](faq/CodeStructure.md)
* [Performance](faq/Performance.md)
* [Design Decisions](faq/DesignDecisions.md)
* [React Redux](faq/ReactRedux.md)
* [Miscellaneous](faq/Miscellaneous.md)
* [Troubleshooting](Troubleshooting.md)
* [Glossary](Glossary.md)
* [API Reference](api/README.md)
* [createStore](api/createStore.md)
* [Store](api/Store.md)
* [combineReducers](api/combineReducers.md)
* [applyMiddleware](api/applyMiddleware.md)
* [bindActionCreators](api/bindActionCreators.md)
* [compose](api/compose.md)
* [Change Log](../CHANGELOG.md)
* [Patrons](../PATRONS.md)
* [Feedback](Feedback.md)
Loading