Skip to content

Commit c8bdf34

Browse files
docs: update upgrade helper doc with logout logic changes
1 parent 5649d77 commit c8bdf34

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docusaurus/docs/reactnative/basics/upgrade_helper.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ yarn add @stream-io/react-native-cameraroll
2121
## Enable Offline Support
2222

2323
Offline Support is a major opt-in feature introduced in v5 of SDK.
24+
25+
> Offline support is currently not implemented for Expo package (stream-chat-expo).
26+
2427
Offline storage implementation currently offers following features:
2528

2629
- access to chat when internet is disabled
@@ -35,6 +38,14 @@ Following features are currently **NOT** implemented. They will be implemented g
3538

3639
To enable offline support please follow the given steps:
3740

41+
- **Upgrade stream-chat dependency (optional)**
42+
43+
If you have installed `stream-chat` dependency explicitely on your application, then upgrade it to v7
44+
45+
```bash
46+
47+
```
48+
3849
- **Add `react-native-quick-sqlite` dependency**
3950

4051
```bash
@@ -90,3 +101,17 @@ To enable offline support please follow the given steps:
90101
...
91102
</Chat>;
92103
```
104+
105+
- **Reset the database when signing out the user**
106+
107+
Since SDK doesn't handle the app level authentication logic, its application's responsibility
108+
to ensure resetting database when user gets logged out. This should be generally done before you
109+
call `client.disconnectUser()`
110+
111+
```jsx
112+
import { QuickSqliteClient } from 'stream-chat-react-native';
113+
114+
// Sign out logic
115+
QuickSqliteClient.resetDB();
116+
chatClient.disconnectUser();
117+
```

0 commit comments

Comments
 (0)