This is a solution to the News homepage challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users should be able to:
- View the optimal layout for the interface depending on their device's screen size
- See hover and focus states for all interactive elements on the page
- Solution URL: Github repo
- Live Site URL: Live Site
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- React - JS library
- Tailwind CSS - CSS framework
- I learnt how to use
useRef
anduseEffect
hooks - I learnt how to close a components wheneve I click outside of it.
To see how you can add code snippets, see below:
const handleClickOutside = (event) => {
if (menuRef.current && !menuRef.current.contains(event.target)) {
handleLinkClick();
}
};
- NEW ReactJs docs
- CSS-TRICKS blog on CSS Grid - This is an amazing article which helped me finally understand CSS Grid. I'd recommend it to anyone still learning this concept.
- ChatGPT - This helped me code better
- Website - Bright Odohofre
- Frontend Mentor - @Odohofre
- Twitter - @B_Odohofre