Coder Social home page Coder Social logo

yena-yun / preonboarding-mission-1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 102 KB

원티드 1번째 기업 과제 (결과 값 캐싱, debounce 최적화)

Home Page: https://preonboarding-mission-1.vercel.app

JavaScript 3.28% HTML 3.08% TypeScript 93.64%

preonboarding-mission-1's Introduction

📚 Preonboarding 1번째 기업 과제

🧪 실행 방법

  1. git clone
  2. yarn install
  3. ** yarn dev (Vite 환경)
  4. 터미널 링크를 눌러 화면 실행

녹화_2023_05_04_18_12_14_660

🧶 기술 스택

React TypeScript Redux Toolkit Styled Components Vite

🔎 작업 내역: 캐싱과 입력 최적화

1. 입력된 키워드 기준으로 캐싱 구현

  • redux-toolkit의 Thunk 함수에서 비동기 API 호출을 처리하는 과정에서 캐싱 구현
  • 입력한 키워드와 그에 맞는 검색 결과를 private 변수에 캐싱
  • 이후 동일한 키워드로 재검색하면 API를 새로 호출하지 않고 캐싱된 결과를 재사용

2. debounce로 입력 후 일정 시간 후에 API 호출

  • debounce를 lodash와 같은 라이브러리 없이 구현
  • 커스텀 hook을 활용하여 뷰 로직이 있는 컴포넌트에서 상태 로직 분리
  • 결과 리스트 보여주기(isOpen)와 API 호출 로직을 400ms마다 한 번씩 실행

🏏 트러블 슈팅

클릭 시 블로그 기록으로 이동합니다.

🧙‍♀️ 프로젝트 개선기

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.