From 17c1d3d2070ee0c060c3e71a9e5868f004b2b034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Tue, 16 May 2023 19:52:29 -0600 Subject: Start point. Visit https://github.com/nvh95/vite-react-template-redux to see original template. --- src/features/counter/counterAPI.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/features/counter/counterAPI.js (limited to 'src/features/counter/counterAPI.js') diff --git a/src/features/counter/counterAPI.js b/src/features/counter/counterAPI.js new file mode 100644 index 0000000..cc9b4a4 --- /dev/null +++ b/src/features/counter/counterAPI.js @@ -0,0 +1,6 @@ +// A mock function to mimic making an async request for data +export function fetchCount(amount = 1) { + return new Promise((resolve) => + setTimeout(() => resolve({ data: amount }), 500) + ); +} -- cgit v1.2.3