Responsive article preview component using Next.js
Design comparison
Solution retrospective
I am proud of how the end product looks stunning and how everything looks visually close to the source material. Something I would do differently would be to further breakdown everything to smaller components from the start.
What challenges did you encounter, and how did you overcome them?I had a lot of difficulties trying to pass the event handling function to the share button. I overcame this using the "use client";
keyword on my components as event handling aren't working server side. And for those who read this. Don't use the "use client";
keyword in the page.tsx file of your Next projects, as it is not advisable for best practices purposes.
I would like some help on a way to close the share panel when there is a click anywhere on the page. It would be great if someone could help me with that. Thanks in advance.
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