Override the serialize and deserialize function for Network Plugin
Summary: This diff overrides the serializer and deserializer methods for the plugins. Reviewed By: danielbuechele Differential Revision: D17402442 fbshipit-source-id: 245990b6060a84995c6637c2d8e5d6a814d546e1
This commit is contained in:
committed by
Facebook Github Bot
parent
4c7227d35e
commit
84dcecb271
@@ -125,6 +125,14 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static serializePersistedState = (persistedState: PersistedState) => {
|
||||||
|
return Promise.resolve(JSON.stringify(persistedState));
|
||||||
|
};
|
||||||
|
|
||||||
|
static deserializePersistedState = (serializedString: string) => {
|
||||||
|
return JSON.parse(serializedString);
|
||||||
|
};
|
||||||
|
|
||||||
static getActiveNotifications(persistedState: PersistedState) {
|
static getActiveNotifications(persistedState: PersistedState) {
|
||||||
const responses = persistedState
|
const responses = persistedState
|
||||||
? persistedState.responses || new Map()
|
? persistedState.responses || new Map()
|
||||||
|
|||||||
Reference in New Issue
Block a user