Migrate framework events backing data structure to datasource

Summary: This will allow us to build a nice table easily.

Reviewed By: lblasa

Differential Revision: D47520029

fbshipit-source-id: 3cdd776533b66688329171eb29b892e0b9153540
This commit is contained in:
Luke De Feo
2023-07-19 08:58:20 -07:00
committed by Facebook GitHub Bot
parent 16480a95f3
commit 7812dae764
6 changed files with 46 additions and 53 deletions

View File

@@ -15,7 +15,7 @@ import {StackTraceInspector} from './StackTraceInspector';
type Props = {
node: UINode;
events: FrameworkEvent[];
events: readonly FrameworkEvent[];
showExtra?: (element: ReactNode) => void;
};
export const FrameworkEventsInspector: React.FC<Props> = ({
@@ -41,7 +41,7 @@ export const FrameworkEventsInspector: React.FC<Props> = ({
};
const hasStacktrace = (event: FrameworkEvent) => {
return event.attribution?.type === 'stacktrace';
return event?.attribution?.type === 'stacktrace';
};
return (