/planets

FrontEnd mentor Challenge

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Frontend Mentor - Planets fact site solution

This is a solution to the Planets fact site challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

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
  • View each planet page and toggle between "Overview", "Internal Structure", and "Surface Geology"

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • Tailwind custom properties
  • React - JS library
  • Next.js - React framework
  • tailwindCSS - For styles
  • Zustand - A small, fast and scalable bearbones state-management solution using simplified flux principles.

What I learned

The application of the state management Zustand in a very simple context.

import { create } from "zustand";

const usePlanets = create((set) => ({
  planet: 0,
  choose: (index) => set(() => ({ planet: index })),
}));

export default usePlanets;

Continued development

There is a lot more to explore in the Zustand context.

Useful resources

  • Zustand/NextJS - "State Management using Zustand In Nextjs 13.4 and React"

Author

Acknowledgments