Skip to content

aryan-tayal/Calculator

Repository files navigation

React Calculator App

This is a solution to the Calculator app challenge on Frontend Mentor built using ReactJS

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:

  • See the size of the elements adjust based on their device's screen size
  • Perform mathmatical operations like addition, subtraction, multiplication, and division
  • Adjust the color theme based on their preference
  • Save theme to local storage

Screenshot

Theme 1 Desktop Design Theme 2 Desktop Design Theme 3 Desktop Design

Links

My process

Built with

What I learned

  • useReducer hook
  • JSS Theme context
  • useRef hook
  • Basic RegEx

Continued development

  • Optimization with useMemo
  • Use prefers-color-scheme to get user theme preference
  • Prevent too many digits

Useful resources

Author

Built by Aryan Tayal

Acknowledgments

I would like to thank Lazar who built this challenge with me along with all the others on Colt Steele's Discord Server.