File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
# QuickBlox React Native SDK
2
2
3
+ ## Documentation
4
+ See docs at https://docs.quickblox.com/docs/react-native-quick-start
5
+
3
6
## Quick Start
4
7
This guide demonstarates how to connect quickblox-react-native-sdk to your project and start development.
5
8
@@ -121,10 +124,10 @@ QB.chat
121
124
To receive new messages, assign event handler using the code snippet below:
122
125
123
126
``` javascript
124
- const emitter = Platform . select ({
125
- android : DeviceEventEmitter,
126
- ios : new NativeEventEmitter (QB .chat )
127
- })
127
+ import { NativeEventEmitter } from ' react-native '
128
+
129
+ const emitter = new NativeEventEmitter (QB .chat )
130
+
128
131
emitter .addListener (QB .chat .EVENT_TYPE .MESSAGE .RECEIVED_NEW_MESSAGE , event => {
129
132
const { type , payload } = event
130
133
// type - type of the event (string)
You can’t perform that action at this time.
0 commit comments