Math-magicians is a fictional company based in France. They have requested a fully-functional MVC product that would assist them with their calculations.
The application should be developed using React Framework and NPM.
You can access a Live Demo HERE
- Initiate Documentation
- Initiate React Application
- Install main dependencies
- Deploy the application
- Build Components: App, Display, ButtonPanel and Button
- App renders Display and ButtonPanel
- Display receives result and result has its validations and default
- Button receives name and name has its validations
- ButtonPanel renders groups of Buttons
Calculate
- Create a calculate method to process the data
- Add functionalities for buttons ('AC ', '=', '+/-' and math operators)
- Use the operate method to make an operation when the sentence is completed.
Operate
-
Create a method for the basic operations
-
Use Big.js to operate big numbers
-
Import calculate to App component
Event Handler
- Calculate logic should work perfectly with buttons interaction
- App is a stateful class Component
- Build Handler Method to add button functionality
- Use calculate logic to set the state of App attributes
- HandleClick is Button Prop and a ButtonPanel prop
- Prop HandleClick is attach as an onCLick Event at Buttons Components.
- Javascript
- React Framework
- NPM
- Using NPM package and JavaScript knowledge to run and make changes in that project.
- You should install Node.js to run the server with the dependency used. If you don't have Node you can follow this tutorial to set it on your local machine: HERE
To get a local copy of this project running follow these simple steps.
- Clone this repository
git clone <repo>
- Navigate to the Repo Folder
- To set Webpack and the dependencies run the command
npm install
- Use the command below to start the server.
npm start
- Use your favorite browser to open http://localhost:3000 to view it in the browser.
This repo contains files to test the application logic and components. You can run the following command on your terminal to run the tests.
yarn test
or customize them changing the files inside the src/__tests __ folder.
👤 Marilena Roque
- Github: MarilenaRoque
- Twitter: @MariRoq88285995
- Linkedin: roquemarilena
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!