Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depends on TextEncoder web api #3927

Open
affectful opened this issue Nov 11, 2024 · 2 comments
Open

Depends on TextEncoder web api #3927

affectful opened this issue Nov 11, 2024 · 2 comments

Comments

@affectful
Copy link

What version of Effect is running?

3.9.2

What steps can reproduce the bug?

Start an expo react native project, add effect, use effect somewhere in the code to initialize effect modules. It'll complain about missing TextEncoder api

What is the expected behavior?

effect by default should not depend on web-only api's or polyfill for react-native

What do you see instead?

crash

Additional information

No response

@affectful affectful added the bug Something isn't working label Nov 11, 2024
@mikearnaldi mikearnaldi removed the bug Something isn't working label Nov 14, 2024
@mikearnaldi
Copy link
Member

Effect does depend on TextEncoder + TextDecoder, it is a web api that is available in most runtimes by default similar to AbortController.

If you are running in a runtime that doesn't support those apis you'll need to polyfill them

@affectful
Copy link
Author

Can a react-native section be added to the effect docs with the required polyfills?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants