Coder Social home page Coder Social logo

react-hooks-mock-code-challenge-gregslist's Introduction

React Mock Code Challenge: gregslist

Demo

Use this gif as an example of how the app should work.

Demo GIF

Instructions

Welcome to gregslist, a community site for finding free items near you.

The designers have put together the components and CSS. Now it's up to you to bring the features to life by adding stateful logic as well as persisting data to the backend via our API.

Your job will be to make our app work according to the user stories you will find the Core Deliverables section.

Setup

  1. Fork and clone this repository.
  2. Run npm start. This will open both your React page on port 6002 and your backend on port 6001.

Core Deliverables

As a user:

  1. When the app starts, I can see all listings.
  2. I can "favorite" and "unfavorite" a listing on the frontend by clicking the star icon. This feature doesn't need backend persistence.
  3. I can remove a listing from the page by clicking the trash can icon. This change should be persisted in the backend.
  4. I can search for listings by their name.

Endpoints for Core Deliverables

The base URL for your backend is: http://localhost:6001.

GET /listings

Example Response:

[
  {
    "id": 1,
    "description": "heater",
    "image": "./images/heater.jpg",
    "location": "BROOKLYN"
  },
  {
    "id": 2,
    "description": "2019 Toyota Tacoma grill",
    "image": "./images/toyota-grill.jpg",
    "location": "Williamsburg"
  }
]

DELETE /listings/:id

Example Response:

{}

Advanced Deliverables

These deliverables are not required to pass the code challenge, but if you have the extra time, or even after the code challenge, they are a great way to stretch your skills.

You'll have to add additional elements for these features. Feel free to style them however you see fit!

Note: If you are going to attempt these advanced deliverables, please be sure to have a working commit with all the Core Deliverables first!

As a user:

  1. I can sort the listings alphabetically by location.
  2. I can create a new listing by submitting a form, and persist the changes to the backend.

Endpoints for Advanced Deliverables

POST /listings

Required Headers:

{
  "Content-Type": "application/json"
}

Request Object:

{
  "description": "heater",
  "image": "./images/heater.jpg",
  "location": "BROOKLYN"
}

Example Response:

{
  "id": 1,
  "description": "heater",
  "image": "./images/heater.jpg",
  "location": "BROOKLYN"
}

react-hooks-mock-code-challenge-gregslist's People

Contributors

ihollander avatar josh-frank 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.