Skip to content

Commit f829578

Browse files
oleksandr-shvetsov-qbOleksandr Shvetsov
authored andcommitted
Added link to docs in README
Fixed creating emitter in README
1 parent 0d8039c commit f829578

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
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
47
This guide demonstarates how to connect quickblox-react-native-sdk to your project and start development.
58

@@ -121,10 +124,10 @@ QB.chat
121124
To 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+
128131
emitter.addListener(QB.chat.EVENT_TYPE.MESSAGE.RECEIVED_NEW_MESSAGE, event => {
129132
const { type, payload } = event
130133
// type - type of the event (string)

0 commit comments

Comments
 (0)