about summary refs log tree commit diff stats
path: root/js/seed/src/state.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/seed/src/state.js')
-rw-r--r--js/seed/src/state.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/seed/src/state.js b/js/seed/src/state.js
new file mode 100644
index 0000000..d1bad17
--- /dev/null
+++ b/js/seed/src/state.js
@@ -0,0 +1,13 @@
+// state.js
+// App state definition and helpers
+
+export const initialState = {
+  query: '',
+  pokemon: null,
+  loading: false,
+  error: null
+};
+
+export function cloneState(state) {
+  return JSON.parse(JSON.stringify(state));
+} 
\ No newline at end of file