-
Notifications
You must be signed in to change notification settings - Fork 198
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
React Native: ReferenceError: Property 'MessageChannel' doesn't exist #374
Comments
Lol I saw that. I think that function should be replaced with But you are still going to have the problems in #80. Try downgrading to 1.x and see if you can get it to work at all. |
Well recreated the class that mimics the behavior of MessageChannel in React Native, leave it here if helps someone.
The crash gone and i get all events now, will be testing... Thanks @alexgleason. |
Used @damiandizeo 's workaround and it works!, can't evaluate the stability yet, will update if it breaks elsewhere! But thank you for posting! ❤️ |
This is awesome, thanks for posting this solution |
The solution of @damiandizeo worked for me, but isn't TypeScript typed, so I had to put a bunch of Alternatively, I was also able to solve the issue by installing npm i message-port-polyfill and importing it before nostr-tools: import 'message-port-polyfill' |
In React Native, i get a crash here: https://github.com/nbd-wtf/nostr-tools/blob/master/helpers.ts#L5 when do
relay.subscribe
, i get event btw.Looks like
class MessageChannel
is not part of React Native.The text was updated successfully, but these errors were encountered: