Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Advice generator App

@Hungerarray

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

@zougari47

Posted

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 GitHub
Discord logo

Join 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