-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
Problem Description
The usePlaidEmitter hook uses a generic event name onEvent which causes collisions with other React Native SDKs using the same event name.
From React Native's documentation:
* Currently, all native events are fired via a global `RCTDeviceEventEmitter`.
* This means event names must be globally unique, and it means that call sites
* can theoretically listen to `RCTDeviceEventEmitter` (although discouraged).
If another SDK in a react native app also uses onEvent, both listeners will fire when either SDK emits events, causing potentially unexpected behaviors.
Proposal
Events should be namespaced to ensure global uniqueness, i.e.
const listener = emitter.addListener('PlaidLink.onEvent', linkEventListener);or
const listener = emitter.addListener('onPlaidEvent', linkEventListener);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels