DeviceLogs plugin to Sandy
Summary: Converted the DeviceLogs plugin to sandy. Kept logic and UI the same (so same batching, localstorage mechanisms etc). But used sandy api's for log subscribing, state, and separating the logical part of the component from the UI. Note that some mechanisms work slightly different, like deeplinking and scrollToBottom handling, to reflect the fact that plugins are now long lived Reviewed By: jknoxville Differential Revision: D22845466 fbshipit-source-id: 7c98b2ddd9121dc730768ee1bece7e71bb5bec16
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dd15cffa64
commit
685cc09b3b
@@ -343,12 +343,11 @@ class PluginContainer extends PureComponent<Props, State> {
|
||||
let pluginElement: null | React.ReactElement<any>;
|
||||
if (isSandyPlugin(activePlugin)) {
|
||||
// Make sure we throw away the container for different pluginKey!
|
||||
pluginElement = (
|
||||
<SandyPluginRenderer
|
||||
key={pluginKey}
|
||||
plugin={target.sandyPluginStates.get(activePlugin.id)!}
|
||||
/>
|
||||
);
|
||||
const instance = target.sandyPluginStates.get(activePlugin.id);
|
||||
if (!instance) {
|
||||
return null;
|
||||
}
|
||||
pluginElement = <SandyPluginRenderer key={pluginKey} plugin={instance} />;
|
||||
} else {
|
||||
const props: PluginProps<Object> & {
|
||||
key: string;
|
||||
|
||||
Reference in New Issue
Block a user