Skip to content

Commit ba88034

Browse files
committed
Allow react-devtools-inline createStore() method to override Store config params
1 parent f56dfe9 commit ba88034

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/react-devtools-inline/src/frontend.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,16 @@ import {
1515

1616
import type {Wall} from 'react-devtools-shared/src/types';
1717
import type {FrontendBridge} from 'react-devtools-shared/src/bridge';
18+
import type {Config} from 'react-devtools-shared/src/devtools/store';
1819
import type {Props} from 'react-devtools-shared/src/devtools/views/DevTools';
1920

20-
type Config = {|
21-
supportsNativeInspection?: boolean,
22-
|};
23-
2421
export function createStore(bridge: FrontendBridge, config?: Config): Store {
2522
return new Store(bridge, {
2623
checkBridgeProtocolCompatibility: true,
2724
supportsTraceUpdates: true,
2825
supportsTimeline: true,
29-
supportsNativeInspection: config?.supportsNativeInspection !== false,
26+
supportsNativeInspection: true,
27+
...config,
3028
});
3129
}
3230

packages/react-devtools-shared/src/devtools/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const LOCAL_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY =
6464

6565
type ErrorAndWarningTuples = Array<{|id: number, index: number|}>;
6666

67-
type Config = {|
67+
export type Config = {|
6868
checkBridgeProtocolCompatibility?: boolean,
6969
isProfiling?: boolean,
7070
supportsNativeInspection?: boolean,

0 commit comments

Comments
 (0)