-
Notifications
You must be signed in to change notification settings - Fork 35
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
[임귀태] Sprint5 #163
The head ref may contain hidden characters: "React-\uC784\uADC0\uD0DC-sprint5"
[임귀태] Sprint5 #163
Conversation
…ithub-actions [Fix] delete merged branch github action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
과제하느라 고생하셨습니다! 기존의 과제에서 리액트로 잘 변환해주셨네요 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
라우터 적용해주신거 좋네요! 사용하시지 않는 주석은 지워주셔도 좋습니다.
|
||
try { | ||
const response = await fetch( | ||
`https://panda-market-api.vercel.app/products?${query}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base url 부분은 보안상 외부로 노출하지 않는 것이 좋기 때문에 .env 파일을 만들어서 관리해주시고 gitignore에 .env를 올려주셔서 깃에 올라오지 않게 해주시는 것도 좋습니다.
import React, { useState, useEffect } from "react"; | ||
import { Link } from "react-router-dom"; | ||
import ItemCard from "./ItemCard"; | ||
import { getProducts as getAllItems } from "../../../js/itemApi"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alias path라는 것을 적용해보시면 경로를 좀 더 깔끔하게 관리할 수 있습니다.
|
||
// 화면 크기 변경 시, pageSize 재계산 | ||
window.addEventListener("resize", handleResize); | ||
fetchData({ page, pageSize, orderBy: "recent" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recent 같이 변하지 않는 값은 상수로 관리해주시면 좋습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컴포넌트는 내부에서 export와 return 해주셔야 합니다. 여기에는 둘 다 빠져있는 것 같아요!
체크리스트 [기본]
중고마켓
중고마켓 반응형
베스트 상품
전체 상품
체크리스트 [심화]