@elaineleung
Posted
Hi Miran, if you're looking to add some animation in the transition duration where the advice changes, maybe you can have a look at my solution, as I used a loader and also I had some transition with the height change I believe: https://www.frontendmentor.io/solutions/responsive-component-with-api-and-data-fetching-acBCRNQ6R9. By the way, I like the rolling animation for the dice!
Right now I'm viewing this on Firefox and it doesn't load the second advice due to caching. If you have Firefox, you can test it out as well. To fix that, add a request header object in fetch, like this:
fetch(url, { cache: 'no-cache' })
Hope some of this can help you out!
Marked as helpful
@miranlegin
Posted
@elaineleung Hi Elaine, thanks for the feedback. I've seen your example and this is kinda similar to what i wan't to achive so i will take a closer look at that.
I wasn't aware of the issues with Firefox so this is quite a helpfull comment and i will update my solution accordingly.
Keep coding! Miran