pusher / pusher-websocket-react-native

React Native official Pusher SDK
MIT License
62 stars 55 forks source link

Async functions should be sync #75

Closed Stevemoretz closed 1 year ago

Stevemoretz commented 1 year ago

What is the issue?

There are many libraries like laravel-echo which expect sync function eg:

this.subscription = this.pusher.subscribe(this.name);

but this library expects everything to have a await

...

Is it a crash report? Submit stack traces or anything that you think would help

...

No

Any improvements you suggest

...

Sure, the api should match the pusher-js so everything would work everywhere!

I don't even understand why pusher-js is deprecated for react-native while clearly this is not an alternative to that, why would anybody think this is a better solution, let alone the fact that it support only iOS 13 above and Android 7 above, it's a nightmare to install and after you do finally install it, you realize it is different and doesn't even work!


CC @pusher/mobile

benw-pusher commented 1 year ago

This library is fully compatible with the Pusher service and is designed for use with our service. We are not able to guarantee that the library would work with third party frameworks such as Laravel Echo. We recently resolved an issue that prematurely removed RN support from the js library and so you may be able to use pusher-js. If you lock the version in use then you also would not be impacted by any future changes to that library that deprecate RN support.