Azure / Azure/fetch-event-source

Does React Native app supported?

Open
#60 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.9k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/Azure/fetch-event-source/pull/22).

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](https://github.com/Azure/fetch-event-source/assets/8955835/d91ef2c7-29b3-4f92-9135-aec6a7136bf9).

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.