🚀 Built an Image Gallery App using React! Today I took another step forward in my React journey by learning an important React Hook — useEffect. It is used to handle side effects in React components, such as fetching data from an API, and it also helps control when the code should run. I also learned about Axios, a JavaScript library used to make HTTP requests to servers. To practice these concepts, I built a Gallery Application that fetches images from the Lorem Picsum API and displays them in a responsive UI. While building this project, I solved a couple of challenges: 1. Pagination I implemented pagination using a state variable for the page index. When the Next or Prev button is clicked, the page number changes and new images are fetched from the API. 2. Loading State I also added a loading indicator that appears while the images are being fetched. Once the data is loaded, the images are rendered in the gallery. What I practiced in this project: • React useState • React useEffect • Axios for API requests • Pagination logic • Conditional rendering (Loading state) • Component-based UI design Building small projects like this helps me understand how React works in real-world applications. Looking forward to building more and improving my skills! 🚀 #ReactJS #WebDevelopment #JavaScript #FrontendDevelopment

To view or add a comment, sign in

Explore content categories