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

Icon 사용시 forward Ref 경고 #114

Closed
hyesungoh opened this issue May 5, 2022 · 0 comments
Closed

Icon 사용시 forward Ref 경고 #114

hyesungoh opened this issue May 5, 2022 · 0 comments
Assignees
Labels
fix 트러블 슈팅 및 디버깅

Comments

@hyesungoh
Copy link
Member

설명

Icon 컴포넌트와 함께 Link 컴포넌트를 사용할 때 ref를 전달해줄 수 없다는 경고가 발생하네요!!

스크린샷 2022-05-06 오전 1 24 51

스크린샷 2022-05-06 오전 1 24 58

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

원래는 InternalLink 컴포넌트를 사용하다 발생한 경고라, 디버깅해보고 forwardRef를 InternalLink에 적용도 해보았는데 똑같더라구요 !

아마 Svg 컴포넌트를 forwardRef와 함께 사용하면 해결될 듯 합니다!

관련 아티클과 삽질기 공유 드릴게요!!

일단 경고라 무시하고 개발해도 좋아용

@hyesungoh hyesungoh added the fix 트러블 슈팅 및 디버깅 label May 5, 2022
@hyesungoh hyesungoh self-assigned this May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 트러블 슈팅 및 디버깅
Projects
None yet
Development

No branches or pull requests

1 participant