Skip to content

Conversation

@davidperrenoud
Copy link

Right now, emit() can send any object on iOS, but it can only send a Map on Android (a JSON object).

This pull request allows the emit() method on Android to send a string:
socket.emit('some_event', 'a string')

Or a JSON object (as before):
socket.emit('some_event', { some_key: 'some value' })

This is implemented on Android using two methods, one taking a String and the other taking a ReadableMap:
https://facebook.github.io/react-native/docs/native-modules-android.html#argument-types

@davidperrenoud davidperrenoud mentioned this pull request Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant