Skip to content

Commit

Permalink
reset parameter documentation (#951)
Browse files Browse the repository at this point in the history
Co-authored-by: Harsh Vardhan <[email protected]>
  • Loading branch information
hvardhan-unth and Harsh Vardhan authored Jun 4, 2024
1 parent 0ca61ca commit 9f59968
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,12 @@ The reset method clears the internal state of the library for the current user a

Note: Each time you call reset, a new AnonymousId is generated automatically.

And when false is passed as an argument in reset method, it will skip resetting the anonymousId (but reset the rest of the user date).

Method signature:

```js
reset: () => void;
reset: (resetAnonymousId = true) => void;
```

Example usage:
Expand All @@ -405,6 +407,8 @@ Example usage:
const { reset } = useAnalytics();

reset();

reset(resetAnonymousId = false);
```

### Flush
Expand Down

0 comments on commit 9f59968

Please sign in to comment.