jugosack / math-magicians

Microverse Module 03 Project: "Math Magicians" is a website for all fans of mathematics. It is a Single Page App (SPA) that allows users to make a simple calculations and read a random math-related quote. Built with React, Sass and JavaScript.
https://math-magicians-6svd.onrender.com
MIT License
1 stars 0 forks source link

Description for using functional components #4

Open jugosack opened 1 year ago

jugosack commented 1 year ago

Per project requirements, If you already use functional components, you can create a GitHub issue in which you describe how you use functional components and ask for a code review based on your issue. As of React v16.8 it's recommended to only write functional components. You might see class components every once in a while, but it's discouraged to use them.

Per React docs: React components are regular JavaScript functions except:

Functional components are preferred over class components:

For this project, instead of using classes, it is created the Calculator.js and Input.js components as functional components in their respective files.

AmaduKamara commented 1 year ago

Status: Approved 🟢 🟢 🟢

Hi @jugosack,

Your project is complete! There is nothing else to say other than... it's time to merge it: ship it: Congratulations! 🎉

Highlights:

✅ You used Gitflow correctly 👍🏽 ✅ Linter checks passed 👍🏽 ✅ Calculator component refactored to use hooks 👍🏽 ✅ All calculator logic and functions work fine as expected 👍🏽

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear. Please, remember to tag me in your question so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.