News homepage using React and Tailwind CSS
Design comparison
Solution retrospective
This is my first time using Tailwind CSS. At first, I thought it would be challenging to apply styles directly in the JSX code, but after trying it out, I realized it wasn't as difficult as I expected. In fact, it allowed me to style components more quickly without having to think about class names.
What challenges did you encounter, and how did you overcome them?I didn't encounter many issues, but the main challenge was related to how I handled image paths. I initially created an object to store the article data, including the image paths within the same object. However, when I tried to use map to render the articles, the images did not display correctly. To resolve this, I had to import the images first and then update the object to reference the imported images.
What specific areas of your project would you like help with?import imgRetroPcs from '../assets/images/image-retro-pcs.jpg'; import imgTopLaptops from '../assets/images/image-top-laptops.jpg'; import imgGamingGrowth from '../assets/images/image-gaming-growth.jpg'; export const articlesData = [ { imgArticle: imgRetroPcs, number: '01', title: 'Reviving Retro PCs', description: 'What happens when old PCs are given modern upgrades?' }, { imgArticle: imgTopLaptops, number: '02', title: 'Top 10 Laptops of 2022', description: 'Our best picks for various needs and budgets' }, { imgArticle: imgGamingGrowth, number: '03', title: 'The Growth of Gaming', description: 'How the pandemic has sparked fresh opportunities.' } ];
I don’t have a specific area in mind, but I would appreciate any comments or suggestions that could help me improve my project. I'm open to feedback on my code structure, styling, or any best practices that could enhance the overall quality of my work.
Community feedback
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