Skip to content

Commit

Permalink
Tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dpikt committed Jul 10, 2018
1 parent 5dc3145 commit 91acf11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Given a path, it sets the state at that path to the payload of an action.
### Parameters

- `path` **[String][10]** Path to the part of the state that will be set
- `transform` **[Function][11]** A function with arguments `(action, state, slice)` that can be used to transform the value that will be set. `slice` is the data, if any, that already exists in the state at `path`. The default transform function simply returns the action's payload. If the same value is always set, it can be passed in place of the transform function.
- `transform` **[Function][11]** A function with arguments `(action, state, slice)` that can be used to transform the value that will be set. `slice` is the data, if any, that already exists in the state at `path`. The default transform function simply returns the action's payload. To set the state to a constant value, simply pass the value in place of the transform function.

### Examples

Expand Down
2 changes: 1 addition & 1 deletion src/setState.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { set, get } from 'lodash/fp'
* @name setState
* @type Function
* @param {String} path - Path to the part of the state that will be set
* @param {Function} transform - A function with arguments `(action, state, slice)` that can be used to transform the value that will be set. `slice` is the data, if any, that already exists in the state at `path`. The default transform function simply returns the action's payload. If the same value is always set, it can be passed in place of the transform function.
* @param {Function} transform - A function with arguments `(action, state, slice)` that can be used to transform the value that will be set. `slice` is the data, if any, that already exists in the state at `path`. The default transform function simply returns the action's payload. To set the state to a constant value, simply pass the value in place of the transform function.
* @returns {Function} - A function that can be used in a reducer to handle an action.
*
* @example
Expand Down

0 comments on commit 91acf11

Please sign in to comment.