Advice Generator Solution using React Js

Solution retrospective
Please provide some feedback.. :)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @melwynt
Hi there!
Good job on the design.
For the quotes, you might want to use those symbols instead to respect the design: Reversed Double Prime Quotation Mark
The dice button is not working. I also used React for this project. Please feel free to check my solution here.
I think you are facing the same issue that I had.
Fetch
(orAxios
) is caching the data. Because of this it will always return the same value. To overcome this, the URL needs to be always different. This can be done by inserting a timestamp in the url. Here's an example withAxios
:const getData = async () => { const url = 'https://api.adviceslip.com/advice'; const data = await axios.get(`${url}?timestamp=${new Date().getTime()}`); setAdvice(data.data.slip); };
All the best!
Marked as helpful - @shashreesamuel
Hey, good job completing this challenge, keep up the good work
Your solution looks great however I think the green dice needs some margin from top using
margin-top
I hope this helps
Cheers Happy coding 👍
Marked as helpful
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