hayanmind logo

무한 스크롤 리스트

프리온보딩 코스 HayanMind 기업 과제

View Demo

📋 과제 요구사항 보기

Assignment

The main technical stack for HayanMind front-end developer is "React". Mobile applications are implemented as "React Native", and web projects use "React". In this assignment, we will implement an infinite scroll list using React.

Requirement

  • Implement the user's comment data list with infinite scrolling by getting more 10 comments repeatedly.

Data API

[
  {
    "postId": 1,
    "id": 1,
    "name": "id labore ex et quam laborum",
    "email": "Eliseo@gardner.biz",
    "body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium"
  },
]

Design

About The Project

project screenshot

Built With

  • React
  • TypeScript
  • axios
  • styled-components

Getting Started

Installation

To install packages:

npm install

To serve the app:

npm start

Features

  • Intersection Observer를 활용한 무한 스크롤 리스트 구현
  • axios를 활용해 API 클래스 util 작성

Refactoring

  • Intersection Observer 로직을 분리해 useOnScreen 커스텀 훅 작성
  • TypeScript로 변환