@dylan-dot-c
Posted
This is a great attempt, well done.
As it comes to mobile-first or desktop-first, I normally did desktop first because it was what I used to, that I stumbled upon a challenge that I did desktop first and when I was doing the mobile version I almost cried... Since then I always go for mobile-first, as for my reason its better to do from small to large and not vice versa, also that mobile looks better on desktop compared to desktop on mobile(silly reason). For me doing mobile first help me make better layouts.
Also another thing I find interesting, that is your logic for swapping Images, I recently discovered the <picture></picture>
element in html, but that helps with swapping images automatically based on the viewport and im not sure but I checked on StackOverflow and it seems NextJs now supports it, so you should still be able to use the NextImage component for that.
Disclaimer: I haven't completed this challenge as yet.
Marked as helpful
@jaceleedev
Posted
@dylan-dot-c Thank you for your great opinion. Many people are using websites and applications on mobile devices, and the use of services on mobile is increasing compared to desktop. I also know that many startups create prototypes with only mobile views. Regardless of personal preference, the mobile-first approach seems important. I plan to proceed with the next challenge using the mobile-first approach as well.
I've learned about the <picture> tag before, but I didn't think of it at all for this project. Next time, when there is a case where the image source changes according to the viewport, I think it would be good to use the <picture> tag.
Thanks for the good tip. Happy coding!