Support receiving messages in Sandy plugins
Summary: This diffs adds the capability to listen to messages in Sandy plugins. Although API wise it looks more like the old `this.subscribe`, semantically it behaves like the `persistedStateReducer`; messages are queued if the plugin is enabled but not active. Reviewed By: nikoant Differential Revision: D22282711 fbshipit-source-id: 885faa702fe779ac8d593c1d224b2be13e688d47
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6c79408b0f
commit
bb0c8e0df0
@@ -32,6 +32,10 @@ function initialRecordingState(): typeof pluginRecordingState {
|
||||
};
|
||||
}
|
||||
|
||||
export function isRecordingEvents(pluginKey: string) {
|
||||
return pluginRecordingState.recording === pluginKey;
|
||||
}
|
||||
|
||||
export function flipperRecorderAddEvent(
|
||||
pluginKey: string,
|
||||
method: string,
|
||||
|
||||
Reference in New Issue
Block a user