Code Monkey home page Code Monkey logo

frontend-challenge's Introduction

This small project is to assess a front-end engineering candidate's procifiency with React, Nextjs and CSS. The goal is to create a feed of Barstool Sports content with some additional functionality.

Requirements

Please complete the following features:

  • Fetch stories from the Barstool API and render them in a feed.
    • Create a Feed component to render a list of stories.
    • Create a Story component to render each story.
  • Add a Load More button to fetch older stories and add them to the list.
    • There should be a loading state for the button while the data is fetching.
    • Create a custom hook called useFeed to implement this feature.
  • Add polling to check for new stories every 10 seconds and prepend them to the feed.
    • Add this functionality to the useFeed hook.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result. There are some global styles and basic layout set up on the homepage.

You can start by modifying pages/index.tsx.

API Details

The API URL to GET stories can be found in src/constants/index.ts. This endpoint will return 25 stories by default. You can fetch additional stories by appending the page query paramater.

Design

<Story />

Screen Shot 2021-06-18 at 1 26 11 PM

<Feed />

Screen Shot 2021-06-18 at 1 30 01 PM

Load More Button

Screen Shot 2021-06-18 at 1 28 22 PM

Screen Shot 2021-06-18 at 1 28 42 PM

frontend-challenge's People

Contributors

josephbona avatar

Watchers

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