Convert React DevTools to Sandy

Summary:
Converted ReactDevTools to Sandy, no real semantic changes. Will add those in next diffs.

Made some minor flow optimizations.

The port forwarding setup interacted directly with the Flipper store, so made an escape hatch for that. Will clean that up again in next diffs.

Reviewed By: passy

Differential Revision: D28380055

fbshipit-source-id: 053979fd10bf3b62089a4f1e27b0e02b4b05e2e1
This commit is contained in:
Michel Weststrate
2021-05-12 14:20:57 -07:00
committed by Facebook GitHub Bot
parent e7670e4e42
commit 4062950fbe
3 changed files with 158 additions and 172 deletions

View File

@@ -13,6 +13,7 @@ import reducers, {Actions, State as StoreState, Store} from './reducers/index';
import {stateSanitizer} from './utils/reduxDevToolsConfig';
import isProduction from './utils/isProduction';
import {_SandyPluginDefinition} from 'flipper-plugin';
export const store: Store = createStore<StoreState, Actions, any, any>(
rootReducer,
// @ts-ignore Type definition mismatch
@@ -36,3 +37,7 @@ if (!isProduction()) {
// @ts-ignore
window.flipperStore = store;
}
// Escape hatch during Sandy conversion;
// Some plugins directly interact with the Store and need further abstractions
// @ts-ignore
window.__SECRET_FLIPPER_STORE_DONT_USE_OR_YOU_WILL_BE_FIRED__ = store;