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

Feature/share 결과 공유 페이지 #7

Merged
merged 4 commits into from
Aug 28, 2024
Merged

Conversation

whitedev7773
Copy link
Collaborator

@whitedev7773 whitedev7773 commented Aug 28, 2024

구현한 기능

  • 동BTI 카드 공유 페이지 헤더까지 개발

논의하고 싶은 내용

기타

  • main에 적용된 padding까지 계산한 값으로 padding 수정 필요

@whitedev7773 whitedev7773 changed the title Feature/share Feature/share 결과 공유 페이지 Aug 28, 2024
Copy link
Member

@toothlessdev toothlessdev left a comment

Choose a reason for hiding this comment

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

LGTM! 😊

Comment on lines +1 to +15
import { forwardRef } from "react";

import { AppBarElement } from "./AppBar.style";

export interface AppBarProps extends React.ComponentProps<"div"> {
children: React.ReactNode;
}

export const AppBar = forwardRef<HTMLDivElement, AppBarProps>(({ children, ...props }, ref) => {
return (
<AppBarElement ref={ref} {...props}>
{children}
</AppBarElement>
);
});
Copy link
Member

Choose a reason for hiding this comment

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

forwardRef 는 리액트 노드의 ref 속성에 접근할때
예를들어 input, button 과 같은 경우에만 사용하면 될것 같습니다!
ref props 는 일반적인 props 와 다르게 React Fiber Node 에 저장되기 때문에 forwardRef 로 전달하는거에요!
그냥 styled component 를 사용하면 ref 도 자동으로 전달해주니 저런식으로 굳이 짤 필요는 없다고 생각됩니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이해됐습니다! 다음 PR과 함께 수정하겠습니다!

@toothlessdev toothlessdev merged commit 6e419da into develop Aug 28, 2024
2 checks passed
@toothlessdev toothlessdev deleted the feature/share branch August 28, 2024 13:41
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