Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

ReactJS TailwindCSS Vite Responsive Mobile and Web Advice Generator

lavollmer 350

@lavollmer

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

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:

  1. 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.

  2. 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 the catch block contains the code to handle the error if it occurs. The code inside the try block is executed line by line. If no errors occur, the catch block is skipped. If an error occurs, control is transferred to the catch block.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

What specific areas of your project would you like help with?

I was able to finish all the requirements for the project!

Community feedback

@TedJenkler

Posted

Hi Lavollmer,

Nice project! I have a few recommendations that might help improve it further:

Responsive Design: It's essential for a good user experience, even if it might seem less exciting than other aspects of development. I suggest looking into using breakpoints like md:, lg:, and xl: to make the layout more dynamic and prevent text from stretching into a single long row on larger screens.

Code Practices: Avoid copying and pasting code from tools like ChatGPT without a thorough understanding. It's noticeable when comments and code structure appear to be generated by AI, which can affect the perceived quality of your work. It’s better to use your understanding to write code, adding only necessary comments that enhance readability.

Using Axios: While not essential, considering the use of Axios instead of Fetch can be beneficial. It offers additional features and might simplify handling HTTP requests.

I hope this feedback is helpful as you continue to develop your skills!

Best, Teodor

0

lavollmer 350

@lavollmer

Posted

Hi Teodor -

Thank you so much for your comments and feedback! I will work on the responsive design and adding breakpoints - I think that will help my project.

As for code practices, I do have a thorough understanding of the code I wrote from API fetching to my dynamic design. If asked, I would be able to explain every aspect of my code, and its reasoning for use. I was able to use a tool to more eloquently explain those processes and be more succinct in my project for other users.

I haven't been exposed to Axios, but I will research it.

Good luck in the future!

@TedJenkler

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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