diff --git a/src/Client.js b/src/Client.js index c64f510cc..e946ea31a 100644 --- a/src/Client.js +++ b/src/Client.js @@ -173,6 +173,7 @@ export default class Client extends EventEmitter { // $FlowFixMe: We checked persistedStateReducer exists const newPluginState = persistingPlugin.persistedStateReducer( persistedState, + params.method, params.params, ); this.store.dispatch( diff --git a/src/plugin.js b/src/plugin.js index 87a20c84a..2c8c9252c 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -126,7 +126,11 @@ export class FlipperPlugin extends FlipperBasePlugin< A, P, > { - static persistedStateReducer: ?(persistedState: P, data: Object) => $Shape

; + static persistedStateReducer: ?( + persistedState: P, + method: string, + data: Object, + ) => $Shape

; static getActiveNotifications: ?(persistedState: P) => Array; constructor(props: Props<*>) { diff --git a/src/plugins/network/index.js b/src/plugins/network/index.js index b8d173821..f4c20a93e 100644 --- a/src/plugins/network/index.js +++ b/src/plugins/network/index.js @@ -121,6 +121,7 @@ export default class extends FlipperPlugin { static persistedStateReducer = ( persistedState: PersistedState, + method: string, data: Request | Response, ): PersistedState => { const dataType: 'requests' | 'responses' = data.url