react-native-event-source icon indicating copy to clipboard operation
react-native-event-source copied to clipboard

A react-native interface for EventSource: Server-Sent Events for iOS and Android

Results 14 react-native-event-source issues
Sort by recently updated
recently updated
newest added

react native event source doesn't work like native EventSource It keeps requesting api like polling every 10 seconds

I am setting the authorization header as below. The connection is opened, however, after a while, it starts to fail when the authorization token expires. How do I set the...

if i console data from server , it doesnt work , please help my code is as below const getMessages = () => { console.log('ken') const eventSource = new RNEventSource('https://328f2c2d8b21.ngrok.io/sse2');...

Fixes a minor issue in README, which was nevertheless confusing to me when setting up the library, because of the existing EventSource class in javascript.

~I've added the TS definition file, could you review it pls?~ ~https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46390~

When polling, in any case where a server throws 401 or 500 or any error response. Expected behavior: An error event is to be dispatched. What is happening: pollAgain function...

When server response with 401 status code we can catch this event and show "wrong credentials" message to user instead of unlimited tries of reconnections.

Is "message" Event Listener mentioned in the readme default event Listener, like how can we listen to the same event? Plus can we add our custom event listeners in the...

I was running into some issues around `OPTIONS` being undefined, caused by `this` scoping. This replaces `this` with `eventSource` in a couple places.