Skip to content

Commit

Permalink
docs: Add a section for the stop() method (#74)
Browse files Browse the repository at this point in the history
* docs: Add a section for the stop() method

* Update README.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update README.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
  • Loading branch information
ivarconr and thomasheartman authored Mar 18, 2022
1 parent 8c27173 commit d494a66
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ unleash.on('update', () => {

You may provide a custom session id via the "context". If you do not provide a sessionId this SDK will create a random session id, which will also be stored in the provided storage (local storage). By always having a consistent sessionId available ensures that even "anonymous" users will get a consistent experience when feature toggles is evaluated, in combination with a gradual (percentage based) rollout.

### Stop the SDK
You can stop the Unleash client by calling the `stop` method. Once the client has been stopped, it will no longer check for updates or send metrics to the server.

A stopped client _can_ be restarted.

```js
unleash.stop()
```

### Custom store

This SDK will use [@react-native-async-storage/async-storage](https://react-native-async-storage.github.io/async-storage/) to backup feature toggles locally. This is useful for bootstrapping the SDK the next time the user comes back to your application.
Expand Down

0 comments on commit d494a66

Please sign in to comment.