Genymobile / genymotion-device-web-player

Genymotion Virtual Device Web Player
https://www.genymotion.com/
MIT License
91 stars 31 forks source link

[PLAYER-25] adding api to track event #84

Closed jparez closed 1 month ago

jparez commented 1 month ago

Description

Store

Refacto store to subscribe only part of store change. Most likely React useEffect hook, we can now supply an array of dependencies. If no array is supply then the callback will be trigger on each store change

this callback will be trigger only on isKeyboardEventsEnabled change

   this.instance.store.subscribe(
            ({isKeyboardEventsEnabled}) => {
                ...
            },
            ['isKeyboardEventsEnabled'],
        );

nested object

   this.instance.store.subscribe(
            ({isKeyboardEventsEnabled}) => {
                ...
            },
            ['overlay.widgetOpened'],
        );

Trigger on all change

   this.instance.store.subscribe(
            ({isKeyboardEventsEnabled}) => {
                ...
            }
        );

new feature

Adding functions to ApiManager to track events

Events currently tracked

Type of change

Checklist