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

12주차 Assignment - 양라윤 #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rryuuni
Copy link

@rryuuni rryuuni commented Sep 12, 2024

Description

  • 캘린더와 취미검색 페이지 만들기 !

Important content

  • 없습니다.

Question

  • 없습니다.

setDebouncedValue(value);
}, delay);

return () => {
Copy link

Choose a reason for hiding this comment

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

요렇게 useEffect에서 함수를 반환하는 이유가 무엇일까요?!

tab: "music is 마랖...",
content: "🎶🎵🎶🎶🎶🎵🎵",
},
{
Copy link

Choose a reason for hiding this comment

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

????????????????

];

function App() {
const { currentItem, changeItem } = useTabs(0, content);
Copy link

Choose a reason for hiding this comment

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

요렇게 숫자를 바로 집어넣는 것보단 숫자를 상수화해서 상수로 사용하는 법도 있는데요!
요 글 읽어보세욤!

https://javabom.tistory.com/28

const { currentItem, changeItem } = useTabs(0, content);
const fadeInContent = useFadeIn(1, 2);

const [query, setQuery] = useState("");
Copy link

Choose a reason for hiding this comment

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

보통 컴포넌트는 UI를 그린다<-요 역할만 하도록 최대한 역할과 책임을 분리하는 게 좋아요!
그래서 복잡한 로직이나 계산들을 커스텀 훅으로 뺴곤 한답니당..!

만약 이 친구들을 ㅌ커스텀훅으로 뺀다면 어떻게 만들 수 있을까용

<div>
<h1>취미 소개 페이지</h1>
<Search
type="text"
Copy link

Choose a reason for hiding this comment

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

기본값이 text라 안넣어도 될것 같아욜

/>
<p>{apiResult}</p>
{content.map((section, index) => (
<BtnSt onClick={() => changeItem(index)}>{section.tab}</BtnSt>
Copy link

Choose a reason for hiding this comment

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

키키키키를 넣어주세요!!!!!!!!

`;

export const StyledCalendar = styled(Calendar)`
width: 100%;
Copy link

Choose a reason for hiding this comment

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

react calendar와 엮인 클래스 이름을 요기서 선언하기 보단 따로 CSS파일을 만드는 게 더 좋을 것 같아요

@@ -0,0 +1,19 @@
import { useState, useEffect } from "react";

function useDebounce(value, delay) {
Copy link

Choose a reason for hiding this comment

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

요기 아무런 값이 안넣어지면 어떤 일이 일어날까욜

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