{"version":"1.0","type":"rich","title":"[React Native + RxJS] Create an Observable from DeviceEventEmitter - An example to handle 'locationUpdated' event","description":"This example demonstrates how to create an RxJS Observable from React Native’s `DeviceEventEmitter`, enabling reactive handling of the `locationUpdated` event from the `react-native-location` library. It shows the full flow: a factory function wraps `DeviceEventEmitter.addListener` via `Observable.fromEventPattern`, then a second observable applies `.throttle` to limit event frequency and maps raw location coordinates into a simple object. Finally, a subscription logs the transformed location data, with explicit unsubscribe support via `subscription.dispose()`.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-99abc4e549a6acd03c1a78acd81abd39?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}