/news-homepage

This is a solution to the frontend mentor's challenge

Primary LanguageJavaScript

Frontend Mentor - News homepage solution

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.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

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

Screenshot

desktop mobile view

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • React - JS library
  • Tailwind CSS - CSS framework

What I learned

  • I learnt how to use useRef and useEffect 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();
    }
  };

Useful resources

Author