Background | Installations | Usage | App | Building | Testing | Author
This project was a task by Microverse Inc. to build a browser calculator for the Math Magicians fictitious company. The milestones listed below constituted the project development in order of execution:
- Project setup - This involved using
create-react-app
to initialize the application and setting up the necessary dependencies. - Build the calculator user interface - This involved implementing the project React components.
- User interface update - This is when the User Interface was modified with CSS style rules and flexbox rules.
- Calculator functionality - Javascript functions were implemented to manage the calculator arithmetic logic.
- Harmonize the calculator logic and the calculator components - The calculator functionality was implemented by using event listeners to make the calculator components respond to the calculator logic.
- Use React Hooks for state management.
- Create a three page website and add routing between the pages.
- Use Jest and React testing library to test the three page website.
The built app is hosted on Heroku
You may see the demo version here
The tools used to build the calculator are listed below:
- Javascript(ES6).
- React
- prop-types node module
- big.js node module
- eslint
- stylelint
To use the code in this repository, follow the steps in this section:
You should have the following packages installed on your computer inorder to run the code contained herein.
- Node JS
- npm and npx
First get a copy of the project on your computer:
- Clone or download the repository to a local directory on your computer by following the Github instructions at Github clone/download repository.
Once you have a local copy of the entire project on your computer, then:
- If you don't meet the above prerequisites, visit node download and installations docs to install node js and npm.
- Run
npm install
to install the project dependencies in the package.json file.
Jest was used to test the code contained herein. To run the tests written in this project, then:
- Type/copy
npm run test
into the terminal and strikeEnter
.
With the installations above complete, you are set to locally use the code. Follow these simple steps:
- Change directory into the directory where you cloned the repository.
- Open the project directory in your editor of choice. For example running
code .
will open the project in VSCode. - Run
npm start
to start webpack-dev-server. - If everything worked well, the browser should automatically render the calculator on
http://localhost:3000/
.
👤 Mworekwa Ezekiel
- Github: @vanheaven-ui
- Twitter: @MworekwaE
- Linkedin: @linkedin
- Email: ezekiel
Contributions, issues and feature requests are welcome!
- To create an issue, visit the issues page and create a new issue.
- To contribute to the code base, follow the steps below:
- Fork this repository to your remote respository by clicking the Fork button in this repository.
- Clone this repository to a directory on your computer by following Github guidelines.
- Change directory into the directory where you cloned this repository to.
- Open the directory using your favorite editor.
- Create a feature branch off the develop branch.
- Make and commit the nuanced code.
- Open a pull request describing the improvements made And your reward awaits in heaven.
Give a ⭐️ if you like this project!