File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# QuickBlox React Native SDK
22
3+ ## Documentation
4+ See docs at https://docs.quickblox.com/docs/react-native-quick-start
5+
36## Quick Start
47This guide demonstarates how to connect quickblox-react-native-sdk to your project and start development.
58
@@ -121,10 +124,10 @@ QB.chat
121124To receive new messages, assign event handler using the code snippet below:
122125
123126``` 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+
128131emitter .addListener (QB .chat .EVENT_TYPE .MESSAGE .RECEIVED_NEW_MESSAGE , event => {
129132 const { type , payload } = event
130133 // type - type of the event (string)
You can’t perform that action at this time.
0 commit comments