-
Notifications
You must be signed in to change notification settings - Fork 24
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
Cannot use Link of 'react-router' as component #30
Comments
Okay fixed the runtime error, but it still doesn't do what I want <Translate to='/courses' content='goto-course-list' component='Link' >foo</Translate> results of the parent element:
|
@timaschew Would you mind creating a small example (gist?) which will help me to reproduce this? Thanks! |
I am having the same problem when making a conditional component that may turn into react-router Link. const Item = ({children, ...props}) => {
let Tag;
if (props.href)
Tag = 'a'
else if(props.to)
Tag = 'Link'
else
Tag = 'div'
return (
<Tag {...props} className={'item ' + (props.className || '')}>
{ children }
</Tag>
);
} |
@mateusfccp Just a quick guess, but shouldn't it be |
I had this same problem and it was because I was using lower case instead of |
I tried to pass a non native HTML element as component like this:
but I got this error, seems like the component was
The text was updated successfully, but these errors were encountered: