Skip to content

klazich/react-calculator

Repository files navigation

react-calculator

Netlify Status

A simple calculator web app built with React and styled using Rebass.

Libraries and Tools

Philosophy

At the beginning some decisions had to be made on the basic functioning of the calculator.

  • It should have the 4 basic operations:

    • Division ÷
    • Multiplication ×
    • Addition +
    • Subtraction -
  • It should use immediate execution logic formula/expression logic.

    • Immediate Execution Logic:

      3 + 5 × 6 - 2 ÷ 4 (((3 + 5) * 6) - 2) / 4 = 11

    • Formula/Expression Logic:

      3 + 5 × 6 - 2 ÷ 4 3 + (5 * 6) - (2 / 4) = 32.5

  • If and operator key is pressed after a value is computed, then the computed value should be continued.

    • Example:

      pressing 2 + 3 = + 4 = 9 is equivalent to pressing 2 + 3 + 4 = 9

Computing Values

About

A calculator built with React, Rebass and Gatsby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published