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

Passing props through Link element #241

Closed
wants to merge 2 commits into from
Closed

Passing props through Link element #241

wants to merge 2 commits into from

Conversation

mmmeff
Copy link

@mmmeff mmmeff commented Nov 11, 2016

Will enable styles, classNames, and other props to be included on the resulting element.

Currently, I'm unable to pass a class onto Link elements and therefore can't customize the styling of a link.

Will enable styles, classNames, and other props to be included on the resulting element.
@rauchg
Copy link
Member

rauchg commented Nov 12, 2016

Please use <Link> as follows:

<Link><a className>hi</a></Link>

I want to deprecate the behavior of <Link> creating an <a> on the fly. It creates too many problems with styling and it just does too much. It should only decorate with the purpose of adding event listeners.

@rauchg rauchg closed this Nov 12, 2016
@rauchg
Copy link
Member

rauchg commented Nov 12, 2016

cc @nkzawa

@mmmeff
Copy link
Author

mmmeff commented Nov 13, 2016

@rauchg

Using the <Link> element as such still leaves the element with a gap in functionality that I was attempting to mend.

My component takes a list of elements and applies a className to them using React.cloneElement.

If my component receives a <Link> component, then there is effectively no way to apply the class to it if I can't pass it down from the highest-order component.

Please reconsider this PR, it's not a huge deviation and has no effect on the current quality of the component's implementation.

@edygar edygar mentioned this pull request Jan 16, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants