Skip to content

Frontend Mentor Coding Challenge built with React and Typescript

Notifications You must be signed in to change notification settings

Deva-Mari/testimonial-slider

Repository files navigation

Frontend Mentor - Coding bootcamp testimonials slider solution

This is a solution to the Coding bootcamp testimonials slider 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 component depending on their device's screen size
  • Navigate the slider using either their mouse/trackpad or keyboard

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • Mobile-first workflow
  • Sass
  • React - JS library
  • Typescript

What I learned

  • Practiced useState and useEffect
const [image, setImage] = useState("");
const [person, setPerson] = useState(0);
useEffect(() => {
  import(`./assets/${data[person].img}`).then((image) =>
    setImage(image.default)
  );
}, [person]);
  • improved Layouting skills
  • learned how to attach keydown Event to div
const keyPressHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {
  if (e.code === "ArrowRight") {
    nextClickHandler();
  }
  if (e.code === "ArrowLeft") {
    prevClickHandler();
  }
};

Continued development

  • improve box-shadow to get closer to design

Author

About

Frontend Mentor Coding Challenge built with React and Typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published