stomp-js / stompjs

Javascript and Typescript Stomp client for Web browsers and node.js apps
Apache License 2.0
776 stars 81 forks source link

how to stompjs use with react native #565

Closed Shubham8507 closed 7 months ago

Shubham8507 commented 1 year ago

Please see FAQs at https://stomp-js.github.io/faqs/2019/05/20/faqs.html before reporting. Can you please explain the stompjs example with react native or version

kum-deepak commented 1 year ago

The closest I can recommend is a contributed sample App for using React with stompjs. Please see https://github.com/stomp-js/rx-stomp-react-sample. There is a tutorial.md file as well.

It has been reported to work. However, I have not validated it myself.

In addition, there is some helpful contributed information compiled at https://stomp-js.github.io/workaround/stompjs/rx-stomp/react-native-additional-notes.html.

iib0011 commented 5 months ago

place this inside index.js or App.jsx


import {TextEncoder} from 'text-encoding';

global.TextEncoder = TextEncoder;
Sathvik-Rao commented 2 months ago

https://stomp-js.github.io/guide/stompjs/rx-stomp/polyfills-for-stompjs.html#in-react-native