Skip to content

Commit

Permalink
Add a note that action creators do not have to be pure (reduxjs#1590)
Browse files Browse the repository at this point in the history
* Add a note that action creators do not have to be pure

As a result of this PR:
reduxjs#1589 (comment)

I understood that some of my understanding about Action Creators were
false. This PR aims to make the fact that action creators are the places
where to make API calls more explicit and clearer for future
readers.

* Add note to finish basic tutorial before heading to advanced tutorial
  • Loading branch information
stenver authored and gaearon committed Apr 11, 2016
1 parent 56f8c7f commit 23efb53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/basics/Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ boundCompleteTodo(index)

The `dispatch()` function can be accessed directly from the store as [`store.dispatch()`](../api/Store.md#dispatch), but more likely you'll access it using a helper like [react-redux](http://github.com/gaearon/react-redux)'s `connect()`. You can use [`bindActionCreators()`](../api/bindActionCreators.md) to automatically bind many action creators to a `dispatch()` function.

Action creators can also be asynchronous and have side-effects. You can read about [async actions](../advanced/AsyncActions.md) in the [advanced tutorial](../advanced/README.md) to learn how to handle AJAX responses and compose action creators into async control flow. Don’t skip ahead to async actions until you’ve completed the basics tutorial, as it covers other important concepts that are prerequisite for the advanced tutorial and async actions.

## Source Code

### `actions.js`
Expand Down Expand Up @@ -143,5 +145,3 @@ export function setVisibilityFilter(filter) {

Now let’s [define some reducers](Reducers.md) to specify how the state updates when you dispatch these actions!

>##### Note for Advanced Users
>If you’re already familiar with the basic concepts and have previously completed this tutorial, don’t forget to check out [async actions](../advanced/AsyncActions.md) in the [advanced tutorial](../advanced/README.md) to learn how to handle AJAX responses and compose action creators into async control flow.

0 comments on commit 23efb53

Please sign in to comment.