@openreplay/tracker-mobx
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "@openreplay/tracker-mobx", | ||
"description": "Tracker plugin for MobX events recording", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "mobx", |
# 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. | ||
@@ -11,3 +12,3 @@ ## Installation | ||
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. | ||
@@ -31,4 +32,4 @@ ```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; | ||
@@ -46,1 +47,2 @@ add?: boolean; | ||
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) |
66188
45