![](https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_900/Screenshots/rzkxdejzj3jec8dwhdkp.jpg)
ReactJS TailwindCSS Vite Responsive Mobile and Web Advice Generator
Design comparison
Solution retrospective
I was able to learn a lot of new information and use it within my project. I feel that I was able to understand APIs, fetching data and displaying it in ReactJS TailwindCSS.
Also, I received a high Lighthouse Report score with (3) 100 scores for web accessibility.
Additionally, I was proud of being able to make the hover glow on the button using a box shadow in a CSS file.
Overall, it was a fun and interesting project!
What challenges did you encounter, and how did you overcome them?I refreshed my knowledge and learned new information on various topics:
-
APIs in Website Development - An API (Application Programming Interface) enables different software applications to share information and interact with each other. It provides a set of instructions that allow software developers to access features and functions, facilitating communication between two pieces of software. The application sending the request is the client, and the application sending the response is the server.
-
Try-Catch Block - This construct handles exceptions and errors that may occur during the execution of a block of code. The
try
block contains the code that might throw an error, while thecatch
block contains the code to handle the error if it occurs. The code inside thetry
block is executed line by line. If no errors occur, thecatch
block is skipped. If an error occurs, control is transferred to thecatch
block. -
JSON Parsing - JSON (JavaScript Object Notation) parsing is the process of converting a JSON string into a JavaScript object. JSON is a data interchange format that is easy for humans to read and write. JavaScript objects allow you to easily access and manipulate the data.
-
JavaScript Object Fundamentals - An object is a collection of key-value pairs where each key is associated with a value. The values can be of any data type.
-
useEffect Hook - This hook provided by React allows you to perform side effects in function components. Side effects can include data fetching and manually changing the DOM. In this code, you want to fetch the advice data as soon as the component mounts. With
useEffect
, you ensure the data fetching happens right after the component is rendered. The empty dependency array ([]
) ensures the effect only runs once. -
useEffect Dependencies - The
useEffect
hook can take dependencies to control when the effect runs. Common dependencies include state variables, props, context values, derived values, empty arrays, and no dependencies. If you have no dependencies, the effect will run after every render.
I was able to finish all the requirements for the project!
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord