๐ Top-level await (ES2022)
const data = await fetch(url).then(r => r.json());export default data;
Note: Only in modules; be mindful of dependency cycles.
const data = await fetch(url).then(r => r.json());export default data;
Note: Only in modules; be mindful of dependency cycles.