+
Skip to content

Subscriptions don't work in React Native: CustomEvent not defined #600

Open
@joefitter

Description

@joefitter

Overview

RPC subscriptions do not work using React Native 0.77.0 with expo 52.0.33, @solana/kit version 2.1.1. This is because Event, EventTarget and CustomEvent are used in rpc-subscriptions-channel-websocket package, and these aren't available in RN.

Steps to reproduce

Create a new Expo app, install @solana/kit add a listener using the async iterator pattern.

Description of bug

EventTarget and CustomEvent aren't defined, example usage: https://github.com/anza-xyz/kit/blob/main/packages/rpc-subscriptions-channel-websocket/src/websocket-channel.ts#L117

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载