fetch-event-source
fetch-event-source copied to clipboard
Does React Native app supported?
Hello everyone,
I'd like to inquire about the compatibility of React Native with this project. I've reviewed the documentation and discussions but couldn't find any explicit mentions regarding React Native support. The only reference I came across is this closed PR: link to closed PR.
I've attempted to integrate this project into a React Native app, specifically for iOS on Apple TV. However, it seems that I'm encountering an issue where I cannot establish a connection.
Here's the error message I've encountered:
ReferenceError: document is not defined
You can view a screenshot of the error here.
I also experimented with adding openWhenHidden: true
, but that only resulted in more errors.
Interestingly, when I tried the same integration with a web app, everything appeared to work correctly.
I appreciate any insights or guidance on this matter. Thanks!
With the way the code is written, no this does not support react-native apps.
Reason: The dispose method is not device agnostic ( uses both document
and window
)