Untitled
useEffect(async () => { try { const response = await fetch(`https://www.testwebsite.com/response.json`); const json = await response.json(); setPosts(json.data.children.map(it => it.data)); } catch (e) { console.error(e); } });
useEffect(async () => { try { const response = await fetch(`https://www.testwebsite.com/response.json`); const json = await response.json(); setPosts(json.data.children.map(it => it.data)); } catch (e) { console.error(e); } });