Code Monkey home page Code Monkey logo

react-api-challenge's Introduction

React API Challenge

This React application is designed to demonstrate basic login functionality, resource listing, and displaying resource details. The primary focus is on integrating the reqres.in API for user authentication and data retrieval using a dedicated service layer.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js (Version 12.x or higher)
  • npm (usually comes with Node.js)

Installation

  1. Clone the repository to your local machine: git clone https://github.com/ppsdang/react-api-challenge.git cd react-api-challenge

  2. Install dependencies: npm install

  3. Run the development server: npm start

The application will be available at http://localhost:3000/.

Tasks

  1. Complete the Authentication Service: Implement the login function in apiService.js to integrate with the Reqres API for user authentication.
  • Login API: https://reqres.in/api/login
  1. Implement Resource Listing and Detail Fetching in the Service Layer:
  • Complete the fetchResources and fetchResourceDetail functions in apiService.js to fetch a list of resources and details of a specific resource.
  • Resources List API: https://reqres.in/api/resources
  • Resource Detail API: https://reqres.in/api/resource/{:id}
  1. Enhance the Resource List and Detail Components: Utilize the functions from apiService.js in ResourceList.js and ResourceDetail.js to display the fetched data.

  2. Bonus Tasks:

  • Implement error handling for API requests.
  • Add loading indicators while data is being fetched.

For detailed API documentation, please visit Reqres.

react-api-challenge's People

Contributors

ppsdang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.