Summary: Sidebar extensions were unkeyed, which make them render inefficiently. I cleaned the api a bit here by making the extensions more idiomatic; they are now components rather then functions, so that they have their own render cycle, state, etc. They are memo-ed now as well, so that they don't have to re-render if the selected item doesn't change. Reviewed By: nikoant Differential Revision: D27685980 fbshipit-source-id: b133bc42061b3b8cf971792f5818810ecb80e3ea
21 lines
446 B
TypeScript
21 lines
446 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import type {Client, Logger, PluginClient, Element} from 'flipper';
|
|
|
|
export const SidebarExtensions: Record<
|
|
string,
|
|
React.FC<{
|
|
client: PluginClient;
|
|
realClient: Client;
|
|
selectedNode: Element;
|
|
logger: Logger;
|
|
}>
|
|
> = {};
|