Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] 비동기함수 useEffect 내부 호출을 통해 url 연동 #33

Open
3 tasks done
BoubleJ opened this issue Jun 4, 2024 · 0 comments
Open
3 tasks done
Assignees

Comments

@BoubleJ
Copy link
Contributor

BoubleJ commented Jun 4, 2024

ISSUE

데이터 조회 시 전달되는 쿼리 스트링값을 복사해 새창에서 열었을 때 데이터가 조회안되는 이슈 해결

  • 쿼리스트링값을 넘겨주긴하지만 url이 데이터 조회 의존성이 없다.
  • Result 컴포넌트 자체에서 비동기함수를 호출하는 것이 아닌 부모 컴포넌트에서 호출한 뒤 props로 전달해주는 방식이 원인
  • Result 컴포넌트 내에서 비동기함수를 호출하고 쿼리스트링값이 바뀔때마다 비동기함수가 다시 호출되도록 구현해야한다.

사진 필요하면 첨부

ESTIMATE

1 DAY

TASKS

  • useEffect 내부에서 비동기함수 호출 및 쿼리스트링값 의존성배열 삽입
  • 상품조회 버튼 클릭 시 쿼리스트링전달 로직 구현
  • 쿼리스트링값 존재or 변경 시 ResultVisible 값 true로 변경 (false 상태면 데이터 결과값이 렌더링 되지 않음)
@BoubleJ BoubleJ self-assigned this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant