/Calculator-React

Implementation of a basic calculator, that you can use on your browser. Developed with React

Primary LanguageJavaScript

Contributors Issues

React Calculator


Explore the docs »

Report Bug · Request Feature

About The Project

A simple calculator that includes basic algebraic operations. A full list of functions & operations implemented can be seen here. Made with React.

Table of Contents

Built With

  • Node.js
  • React
  • React-DOM
  • React-Create-App
  • npm
  • CSS
  • ES6

Installation

Prerequisites

  • Node
  • NPM
  • React

  • Clone the repo with git clone https://github.com/Fig77/calculator-react.git, or download as a ZIP.
  • Run npm install

Functions implemented

  • Simple Algebra functions (+ * / %)
  • Sign changer +/-
  • Chaining of operations (no brackets, calculating the last one before going to the next one)
  • Decimals
  • AC to clean everything

Other definitions:

  • 0/0 as Undefined
  • A/0 as INF
  • INF + operation + number as INF

Usage

  • Run npm start

By default, the server will start in development on localhost, port 3000.

Screenshots

screenshot

Live Version

  • You can view the app hosted online here.

Testing

A few tests are in place for logic. To test them:

  • Run npm test to run the test suites.

Future Improvements

  • Definition for changing sign of INF.
  • Small history display on the side, showing the last few operations.

See the open issues for a list of proposed features (and known issues).

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Distributed under the MIT License. See LICENSE for more information.

Contact📱