Skip to content

Commit

Permalink
Fixed object argument destructuring syntax in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored and aweary committed Apr 13, 2018
1 parent 33345e8 commit d9ae76d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ In some cases, deriving state involves reading from other parts of your state. M
```jsx
const UserPosts = () => (
<State.Consumer selector={state => ({ posts: state.posts, userId: state.user.id }}>
{{posts, userId} => {
{({posts, userId}) => {
const filteredPosts = posts.filter(post => post.id === userId)
return posts.map(post => <Post id={post.id} />)
}
Expand Down

0 comments on commit d9ae76d

Please sign in to comment.