Skip to content

CRUD 피드백 #24

Description

@DevelopSoo
  1. 이 함수는 useEffect 내에서 만들거나 컴포넌트 밖에서 만들 수 있는 방법을 찾읍시다. 컴포넌트 재렌더링 때마다 다시 함수가 생성되어 메모리가 낭비됩니다.
    https://github.com/hyun522/mission/blob/8829897493f5de246d7b0ff4bcb0c71b23bacf46/0617/src/page/%08landing/index.jsx#L16-L26

  2. 빈배열은 falsy 값이 아니라서 의미 없는 코드가 되지 않나요?
    https://github.com/hyun522/mission/blob/8829897493f5de246d7b0ff4bcb0c71b23bacf46/0617/src/page/%08landing/index.jsx#L28-L32

  3. 에러 발생 시에 사용자는 알지 못합니다.

    console.error('Error adding comment', error);

  4. 안쓰면 삭제합니다.

    // useEffect(() => {
    // adjustTextareaHeight();
    // }, []);

  5. 굳이 이렇게해야하나요? 다른 방법은 없을까요? (저도 깊게 생각해본 건 아니니 다른 답을 찾아야한다는 부담감을 가질 필요는 없습니다.)

    const email = name === 'email' ? newValue : formData.email;
    const password = name === 'password' ? newValue : formData.password;
    const checkbox = name === 'checkbox' ? newValue : formData.checkbox;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions