Skip to content

CharlesSquirel/github-frontendmentor

Repository files navigation

Frontend Mentor - GitHub user search app solution

This is my first project after a long break from coding. A very good warm-up in which I learned something new - implementing dark mode with tailwind. By the way, working with the tailwind, especially with RWD, is very pleasant. As a reminder, I added simple unit tests to refresh this topic a bit. This is a solution to the GitHub user search app challenge on Frontend Mentor.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Search for GitHub users by their username
  • See relevant user information based on their search
  • Switch between light and dark themes

Screenshot

Light mode screenshot - desktop Dark mode screenshot - desktop
Light mode screenshot - tablet Dark mode screenshot - tablet
Light mode screenshot - mobile Dark mode screenshot - mobile

Links

My process

Built with

  • React
  • TypeScript
  • Next JS
  • TailwindCSS
  • Jest
  • Testing-Library

What I learned

Custom hook using context:

export const useCustomHookWithContext =
  () => {
    const context =
      useContext(myContext);
    if (context === undefined) {
      throw new Error(
        'Context must be within context provider'
      );
    }
    return context;
  };

Useful resources

  • Dark mode tailwind guide - The new topic is primarily dark mode and its support in tailwind. I searched a bit on the Internet, where there are a lot of articles on this subject, but in the end I found this article described very well.

Author

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published