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

PR: 4주차 과제 - Gang #1

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

PR: 4주차 과제 - Gang #1

wants to merge 19 commits into from

Conversation

ijimlnosk
Copy link

Task 1, Task 2, Task 3

  • Task 1 , Task 2, Task 3
  • Task 1 : 핵심 웹 지표의 정의와 개선할 수 있는 방안에 대하여 정리하기
  • Task 2 : 웹 페이지 배포 후 LightHouse 검사 후 문제점 개선하기
  • Task 3 : React Image Lazy load를 적용, Skeleton UI 적용 하기
  • Task 2, Task 3 Git 링크

Task 4

  • React Suspense를 사용하기

Task 5

  • react-error-boundary를 사용하여 에러 처리하기

Task 6

@ijimlnosk ijimlnosk self-assigned this Mar 30, 2024
@ijimlnosk ijimlnosk changed the title Pair2 gang 4week PR: 4주차 과제 - Gang Mar 30, 2024
Copy link

@TransparentDeveloper TransparentDeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪🙃👍

Comment on lines 12 to 26
const SkeletonMain = () => {
return (
<S.SkeletonWrapper>
<SkeletonBase $width="200px" $height="300px" />
</S.SkeletonWrapper>
);
};
export default SkeletonMain;

const SkeletonWrapper = styled.div`
width: 200px;
height: 300px;
display: grid;
overflow: hidden;
`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

불필요하게 컴포넌트가 분리되어 있다고 느껴집니다.

  • 일단 SkeletonBase 의 props 전달에 문제가 있어보여요, $width -> width 로 해야할 것 같습니다.
  • SkeletonMainSkeletonBase 의 크기를 조정하는 게 목적인가요?
    • 그게 맞다면, SkeletonBase 컴포넌트의 width, height 모두 100% 로 미리 설정하고, 크기와 관련된 props 를 받지 못하도록,,, (저라면 그렇게) 설계할 것 같습니다.!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main page에서 사용하기 위한 스켈레톤 컴포넌트 입니다

Comment on lines 6 to 24
const ImageLoader = ({ src, sizes, srcSet }) => {
const [loading, setLoading] = useState(true);

return (
<Container>
{loading && <SkeletonMain />}
<ImageWrapper>
<Image
alt="image"
fetchPriority="high"
src={src}
sizes={sizes}
srcSet={srcSet}
onLoad={() => setLoading(false)}
/>
</ImageWrapper>
</Container>
);
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
이미지 로딩 중 skeleton 출력하는 것과 관련해서, 1조가 이 방법 말고 다른 방법을 찾은게 있습니다.
조금 더 코드가 간결해 지더라구요.! 한번 읽어봐주세요.

react skeleton component 만들기

load 되지 않는 동안 출력없이 src 에 대한 데이터만 불러오고, 완전히 load 되면 그때 출력하는 방법인 것 같습니다.!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 신기하네요 적용해보겠습니다!

week4/src/App.js Outdated
Comment on lines 1 to 20
import "./App.css";

import { Provider } from "react-redux";

import store from "./libs/redux/store";
import Main from "./page/main";
import GlobalStyle from "./styles/global-style";

function App() {
return (
<>
<Provider store={store}>
<GlobalStyle />
<Main />
</Provider>
</>
);
}

export default App;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙄 불필요한 fragment 가 보입니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오.. 혹시 이게 headless 인가요?? 😮

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

Successfully merging this pull request may close these issues.

2 participants