Is there any library to integrate react native and xmpp?


#1

I am trying to build a chat application with XMPP backend(ejabberd). I found the following repo
https://github.com/aksonov/react-native-xmpp, which uses native iOS and android. But I prefer to use javascript clients to integrate with my UI built with gifted chat.

Strophejs is one of the most stable javascript xmpp client, but there seems to be no easy route to use it in react native. Here is an issue that talks on integration of expo with react native - https://github.com/strophe/strophejs/issues/115. I did look at conversejs and jsxc, they also do not have a straight forward integration.

Is there any other route to integrate react native with xmpp.


#2

For the pure JS lib one, if you could polyfill the parts that assume a DOM environment, then I Don’t see why it wouldn’t work.


#3

Polyfill worked, thank you!


#4

hey @sid how you manage to do with polyfill ? can you give some reference code or anything which will help me.