-
Notifications
You must be signed in to change notification settings - Fork 637
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
using TextEncoder with hermes #948
Comments
this worked for me |
I also want to note that TextEncoder is not a part of the ECMAScript spec. As far as I can tell, it is defined by WHATWG as part of the web APIs. The distinction is subtle but important. JS engines implement ECMAScript, but web browsers implement the web standards. Hermes is only a JS engine, not a web browser. With that said, undeniably there are useful APIs defined as part of the web standards. Theoretically it would be nice if there was a second repository with "add-ons" like this one. |
FYI. #1072 . |
@ahmed-adly-khalil as of 3863a36, Hermes now supports TextEncoder. |
Is it already available with RN 0.73.6? |
@anfearco new features are not automatically picked in RN point releases. I think RN's policy is that point releases only contain bug fixes, but I am not sure. It is possible that if people requested it, they might consider including it in the next point release. |
The commit is tagged hermes-2024-02-20-RNv0.74.0-999cfd9979b5f57b1269119679ab8cdf60897de9 so I would assume not |
@tmikov That makes sense. Thanks for the response! |
@ahmed-adly-khalil Worked for me. Thanks! |
Thanks, it's save my day |
If you need to polyfill, |
|
This was the best solution for me : https://github.com/EvanBacon/text-decoder |
Problem
i'm trying to use https://github.com/nats-io/nats.ws in react native app, and getting the error
ReferenceError: Property 'TextEncoder' doesn't exist, js engine: hermes
The package https://github.com/nats-io/nats.ws uses web sockets to connect to NATS server and used
TextEncoder
to serialize messages before sending to NATSSolution
I understand that hermes leaves out some features from other JS engines like v8 in favor of performance, is there a way to add specific features like
TextEncoder
on the app level?More Context
https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder has the spec for TextEncoder
The text was updated successfully, but these errors were encountered: