diff --git a/tracker/tracker-mobx/README.md b/tracker/tracker-mobx/README.md index 3011a1395..b054247ec 100644 --- a/tracker/tracker-mobx/README.md +++ b/tracker/tracker-mobx/README.md @@ -1,5 +1,6 @@ # OpenReplay Tracker MobX plugin -A MobX plugin for OpenReplay Tracker. This plugin allows you to see the MobX events during session replay. +A MobX plugin for OpenReplay Tracker. +This plugin allows you to see the MobX events during session replay. ## Installation ```bash @@ -8,7 +9,7 @@ npm i @openreplay/tracker-mobx ## Usage Initialize the `@openreplay/tracker` package as usual and load the plugin into it. -Then put the generated middleware into your Redux chain. +Then put is as a second argument to `observe` function from `mobx` package. ```js import Tracker from '@openreplay/tracker'; @@ -27,8 +28,8 @@ Options: ```js interface Options { - predicate?: (ev: { type: string; name: string; object: any; debugObjectName: string }) => boolean; - sanitize?: (ev: { state: any; type: string; property: string }) => { state: any; type: string; property: string }; + predicate?: (observeEvent: { type: string; name: string; object: any; debugObjectName: string }) => boolean; + sanitize?: (resultAction: { state: any; type: string; property: string }) => { state: any; type: string; property: string }; update?: boolean; add?: boolean; delete?: boolean; @@ -41,3 +42,4 @@ trackerMobX({ ``` Where `predicate` can be used to dynamically turn off capturing and `sanitize` can be used to modify the payload before sending it to backend. +Most of the actions fall into `update` type, refer to mobx documentation for more details about add and delete (mostly for Maps) \ No newline at end of file diff --git a/tracker/tracker-mobx/package.json b/tracker/tracker-mobx/package.json index a068278e3..64e197a66 100644 --- a/tracker/tracker-mobx/package.json +++ b/tracker/tracker-mobx/package.json @@ -1,7 +1,7 @@ { "name": "@openreplay/tracker-mobx", "description": "Tracker plugin for MobX events recording", - "version": "4.0.0", + "version": "4.0.1", "keywords": [ "mobx", "logging",