Skip to content

harmanpreet-singh1/calculator-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Full Fledge Calculator with ReactJS


Introduction

This is a calculator app for calculating any number and you can also use this calculator for storing and recalling the value with Mc, Mr, M+, M- functionality (these are very useful for big numbers). This is basically a replica of Casio SL-300SV calculator. All the functionality is same as in original Casio SL-300SV (even look n feel is almost same).

Architecture Details

  • Imagine for a moment an app with only one file for all your components, the store, utilities, everything. A terrible idea, of course. The problem with the large number of files is to navigate them. So, For this reason I structured the application in a effiecent manner.
Directory Structure :-

dir_structure.png

  • As you can see in the above screenshot we have different folders for logic and the view. That means whole calculator logic is in one folder and we are accessing the logic via view folder.

Functionalities

  • User can calculate any number.
  • User can be able to store or recall a number based on the requirement.
  • User can add the stored number directly by using M+ button.
  • Calculator will be automatically off after one minute of inactivity.
  • A beautiful layout of the calculator (same as original Casio SL-300SV).

Installation

  • Clone/Download the repository by using Github Link
  • After the 1st step run npm install in the project folder.
  • After all the necessary packages got installed then run npm start in the command prompt.
  • We can also build the project for the production release by using npm build command.
  • Yeah, that's it. Enjoy the calculator webapp.

Some Examples/Screenshots

Normal View
calculator

Calculator with values
Cal-with-values

Off View
off-view

Some NPM commands for reference

  • npm start starts the development server and auto-reloads the page any time you make edits
  • npm run build bundles the app into static files for production
  • npm test starts the test runner and lets you test your app with Jest as you build it.

Enhacements which can be done

  • We can also use redux for the state management.
  • Keyboard support can be added.
  • Mobile view can be added.

Many thanks for looking out!

About

Full fledge calculator with ReactJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published