Add method field to persistedStateReducer

Summary:
When sending a message from the mobile side, you call something like:

`send(method: string, params: Object)`

But when receiving it in the reducer, you only get the params. Adding method so you can distinguish them.

Reviewed By: passy

Differential Revision: D10447890

fbshipit-source-id: f1fe925e82355866f86b322ecd3c72c604ae86af
This commit is contained in:
John Knox
2018-10-19 03:36:05 -07:00
committed by Facebook Github Bot
parent 48f9b350fe
commit d48f93edea
3 changed files with 7 additions and 1 deletions

View File

@@ -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(