summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/util/state-utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/src/util/state-utils.js')
-rw-r--r--opendc-web/opendc-web-ui/src/util/state-utils.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-ui/src/util/state-utils.js b/opendc-web/opendc-web-ui/src/util/state-utils.js
new file mode 100644
index 00000000..e5b695c3
--- /dev/null
+++ b/opendc-web/opendc-web-ui/src/util/state-utils.js
@@ -0,0 +1,6 @@
+export const getState = (dispatch) =>
+ new Promise((resolve) => {
+ dispatch((dispatch, getState) => {
+ resolve(getState())
+ })
+ })