
Design comparison
Solution retrospective
Had some fun with this one. Was wondering about how to "speed up" the reveal of the shortened link? Or am I at the mercy of the API? Let me know your thoughts. Thanks.
Community feedback
- @awexliPosted over 4 years ago
Hey Kong, sweet solution!
Unfortunately, we are all at the mercy of the API :-( However, even the fastest ones have a window of time before receiving a response, and they're not guaranteed to be consistent either!
That said, it's good practice to have a loading indicator to give visual feedback to the user that their data is being fetched - one way is to change the button text 'Shorten It!' to 'Loading...' while data is being fetched and then setting it back to 'Shorten It!' when you've successfully received a response (There are a myriad of ways you can show loading states)
But we can't always assume responses will be successful either, so catching any unknown errors and displaying that to the user in a digestible way is just as important -- which I'll leave you to figure out 😉
1@kmongyPosted over 4 years agoAh. Thanks for the reply. Yeah I had thought about doing a loading state, but also wanted to "finish" the project haha. Perhaps in version 1.01 of this I'll add that that loading state. Thanks.
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