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

forwardRef을 사용할 시 eslint 버그 발생 #13

Closed
userJu opened this issue Feb 15, 2023 · 2 comments
Closed

forwardRef을 사용할 시 eslint 버그 발생 #13

userJu opened this issue Feb 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@userJu
Copy link
Collaborator

userJu commented Feb 15, 2023

📌 이슈 설명

Skills.tsx 파일에서

Skills.displayName = 'Skills';

를 사용하지 않을 시
🚨

Component definition is missing display nameeslint[react/display-name](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md)

에러가 발생합니다

🐠 체크리스트

  • [ ]
  • [ ]

🚴 이렇게 고쳐볼 수 있을 것 같아요

Skills.displayName = 'Skills';를 사용하면 해결할 수 있습니다
더 좋은 해결방안이 있으면 말해주세요~🤗

🍳 이런 환경에서 발생했어요

  • Device:
  • OS:
  • Browser:
  • Version:

📷 스크린샷

@userJu userJu added the bug Something isn't working label Feb 15, 2023
@msdio
Copy link
Owner

msdio commented Feb 17, 2023

타입을 지정한다는 거죠? 만약에 title 정보를 사용한다면 타입을 SimpleIcons['title']로 하는건 어떤가요??

@msdio
Copy link
Owner

msdio commented Feb 18, 2023

#16 에서 아래와 같이 해결되었습니다!

const iconKey = target as keyof typeof icons;

@msdio msdio closed this as completed Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants