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

Link emotion Props를 넘길 경우 Dom tree에 속성으로 들어가는 이슈 #42

Open
mango906 opened this issue Feb 12, 2022 · 0 comments
Assignees
Labels

Comments

@mango906
Copy link
Member

mango906 commented Feb 12, 2022

image

emotion 에서 Link태그에 custom한 props를 넘길 경우 해당 태그에 속성으로 그대로 들어가는 이슈가 있음. (원인은 파악하지 못했지만 react-router-dom 에서 그렇게 구현해놓은것으로 추정)
우선 Link라는 컴포넌트를 만들어놨지만, 아직 방향성은 정해지지 않았고 해당 태그에서 추가적으로 개발하여 수정할 예쩡

import React from 'react';

import { LinkProps as ReactRouterDomLinkProps, Link as ReactRouterDomLink } from 'react-router-dom';

const Link = ({ children, ...restProps }: ReactRouterDomLinkProps) => {
  return <ReactRouterDomLink {...restProps}>{children}</ReactRouterDomLink>;
};

export default Link;
@mango906 mango906 self-assigned this Feb 14, 2022
@mango906 mango906 added the TODO label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant