Skip to content

Commit

Permalink
Merge pull request #37 from edimitchel/patch-1
Browse files Browse the repository at this point in the history
docs: remove wrong information about snapshot argument
  • Loading branch information
andrewcourtice authored Nov 1, 2021
2 parents f31c847 + 0cdd0a5 commit c7f3844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/extensibility/extensions/snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To take a snapshot simply call the `snapshot` method returned from the store ins
const snap = snapshot();
```

The snapshot method also accepts an optional 2nd argument which is a function that returns a sub-branch of state. This is useful for taking more granular snapshots instead of the whole state tree.
The snapshot method also accepts an optional argument which is a function that returns a sub-branch of state. This is useful for taking more granular snapshots instead of the whole state tree.

```typescript
const snap = snapshot(state => state.details);
Expand Down Expand Up @@ -99,4 +99,4 @@ Along with the `apply` method, the snapshot function returns a `state` object. T
const snap = snapshot();

console.log(snap.state.firstName);
```
```

1 comment on commit c7f3844

@vercel
Copy link

@vercel vercel bot commented on c7f3844 Nov 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.