Refactor export data functions and exportpersistedstate function to just expect state
Summary: This diff refactors the `exportpersistedstate` and few of the functions in exportData.tsx to just expect the Redux State instead the store object. Reviewed By: mweststrate Differential Revision: D18733011 fbshipit-source-id: 56739917b49142ba4b6e79e7c16378fe60d6ac3b
This commit is contained in:
committed by
Facebook Github Bot
parent
bf85da17ab
commit
ca53f35875
@@ -177,7 +177,9 @@ async function exitActions(
|
||||
);
|
||||
outputAndExit(payload);
|
||||
} else {
|
||||
const {serializedString, errorArray} = await exportStore(store);
|
||||
const {serializedString, errorArray} = await exportStore(
|
||||
store.getState(),
|
||||
);
|
||||
errorArray.forEach(console.error);
|
||||
outputAndExit(serializedString);
|
||||
}
|
||||
@@ -254,7 +256,7 @@ async function startFlipper(userArguments: UserArguments) {
|
||||
errorAndExit(e);
|
||||
});
|
||||
} else {
|
||||
exportStore(store)
|
||||
exportStore(store.getState())
|
||||
.then(({serializedString}) => {
|
||||
outputAndExit(serializedString);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user