Created JS function to fetch static JSON. Now loads data Asynchronously :)

This commit is contained in:
2025-02-01 13:00:02 +00:00
parent 4ef0573b55
commit dcc6aa000a
4 changed files with 27 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
export async function getJson(path: string) {
let response = await fetch(path);
let users = await response.json();
return users;
}