File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
docusaurus/docs/reactnative/basics Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ yarn add @stream-io/react-native-cameraroll
2121## Enable Offline Support
2222
2323Offline 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+
2427Offline 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
3639To 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+ ```
You can’t perform that action at this time.
0 commit comments