Web developer able to provide solutions. Proven experience with HTML, CSS, JavaScript to create consumer-focused websites. For over 6 years, I participated and won prizes in web development contests. I have created pages for both desktop and mobile users that meet the highest standards of web design
Latest solutions
REST Countries API with color theme switcher project built using React
#react#sass/scssSubmitted over 2 years ago
Latest comments
- @Edwin574Submitted over 2 years ago@vlad-solomonPosted over 2 years ago
Maybe you should try this one again after some more practice
0 - @ketchanjiSubmitted over 2 years ago
- @StarisblackSubmitted over 2 years ago@vlad-solomonPosted over 2 years ago
Why the modal on page load? It's useless and breaks the flow of the entire experience.
0 - @Maacaa0Submitted over 2 years ago@vlad-solomonPosted over 2 years ago
You could add a second parameter to your fetch request like so:
fetch("https://api.adviceslip.com/advice", { cache: "no-store" })
This will stop the API from caching, and you would be able to make requests one after the other, bypassing those 2 seconds. If I were you, I would add this and get rid of the timeout animation, seeing as it's useless if you spam the generate advice button.
Marked as helpful1 - @KellyCHI22Submitted over 2 years ago@vlad-solomonPosted over 2 years ago
You should really fetch some advice straight away on page load to have it displayed already.
Marked as helpful0 - @martinnkemakolamSubmitted over 2 years ago@vlad-solomonPosted over 2 years ago
Nope, giving classes to the body DOM element is absolutely fine! It's pretty common to use the body for theme changes. Great work
Marked as helpful0