Design comparison
SolutionDesign
Community feedback
- @zougari47Posted over 2 years ago
Hi there👋,
Did you notice that advice doesn't change while clicking the button, You can fix with this solution
export const GetAdvice = async () => { const response = await fetch('https://api.adviceslip.com/advice', { cache: 'no-cache' }) .then((response) => response.json()) .then((json) => json['slip']); return { id: response['id'], message: response['advice'], }; };
Nice work & happy coding.
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord