UID refactor 4/ Expose readonly UIState
Summary: Currently state writes can either go through a named handler that is easy to find and debug or they can directly modify the state. By exposing readonly atoms only we ensure that all state writes go through a UIACtions. This adds consistency and ease of future debugging. E.g We could add a utility to wrap all ui actions with logging statements Reviewed By: antonk52 Differential Revision: D47547531 fbshipit-source-id: f88651169d8e7c5f7e31068d64f9aa5b6b573647
This commit is contained in:
committed by
Facebook GitHub Bot
parent
87a1b657c3
commit
957a336349
@@ -14,7 +14,7 @@ import {
|
||||
ClientNode,
|
||||
FrameworkEvent,
|
||||
} from '../ClientTypes';
|
||||
import {UIState} from '../DesktopTypes';
|
||||
import {ReadOnlyUIState} from '../DesktopTypes';
|
||||
import React, {useMemo} from 'react';
|
||||
import {
|
||||
DataInspector,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from 'flipper-plugin';
|
||||
|
||||
export function PerfStats(props: {
|
||||
uiState: UIState;
|
||||
uiState: ReadOnlyUIState;
|
||||
nodes: Map<Id, ClientNode>;
|
||||
rootId?: Id;
|
||||
events: DataSource<DynamicPerformanceStatsEvent, number>;
|
||||
|
||||
Reference in New Issue
Block a user