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 - 박예은 #4

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

Conversation

yengniws
Copy link

Description

  • 리액트 훅을 이용한 취미 소개 페이지와 캘린더 꾸미기

Important content

  • x

Question

  • x

Reference

  • x

@yengniws yengniws changed the title 12주차 Assignment - 오수경 12주차 Assignment - 박예은 Sep 20, 2024
Copy link

@khj0426 khj0426 left a comment

Choose a reason for hiding this comment

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

굳굳...통과입니당 고생하셨어요! 💯

import { useState } from "react";
// useState 훅을 React로부터 불러와서 상태를 관리할 준비를 한다.

export const useTabs = (initialTab, allTabs) => {
Copy link

Choose a reason for hiding this comment

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

initalState가 undefined면 어떤 일이 일어날까요? (initalTab에 아무것도 안넣은 경우!)

const handler = setTimeout(() => {
setDebouncedValue(value);
}, delay);

Copy link

Choose a reason for hiding this comment

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

요 클린업 함수가 왜 필요할까요!!!

box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
`;

export const StyledCalendar = styled(Calendar)`
Copy link

Choose a reason for hiding this comment

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

음 이렇게 관리할 수도 있지만, 요 코드들을 모아둔 css파일을 만들어서 집어넣을 수도 있겠죠?!

아마 요렇게 css를 만들고

.react-calendar__tile {
    font-size: 16px;
    padding: 20px;
    justify-content: center;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    &:hover {
      background-color: #e1efff;
      box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    }
  }
  // 오늘 날짜
  .react-calendar__tile--now {
    background-color: #7db5f4;
    color: #ffffff;
    border-radius: 12px;
    abbr {
      padding: 5px 12px;
      border-radius: 10px;
    }
  }

리액트 캘린더를 사용하는 쪽에서 이 css파일을 집어넣게 해도 좋을 것 같아요!

import { useFadeIn } from "./hooks/useFadeIn";

const hobbies = [
{ tab: "음악 듣기", content: "인디 음악 조아해요" },
Copy link

Choose a reason for hiding this comment

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

인졍인졍..

const [query, setQuery] = useState("");
const debouncedQuery = useDebounce(query, 300);

const filteredHobbies = useMemo(() => {
Copy link

Choose a reason for hiding this comment

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

요기 useMemo를 걸어주신 이유가 있을까욜

margin-bottom: 20px;
`;

const Button = styled.button`
Copy link

Choose a reason for hiding this comment

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

굳굳 👍

import moment from "moment";

const Calendar = () => {
const [value, onChange] = useState(new Date());
Copy link

Choose a reason for hiding this comment

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

const [value,onChange] = useState(() => new Date());

위 코드와 어떤 차이가 있을까욜

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