-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
className
prop is not applied on <Link />
component when generated with server-side rendering
#5403
Comments
This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux. Thanks! |
@timdorr How is this not a bug? It is supposed to be supported according to the v3 docs:
https://github.com/ReactTraining/react-router/blob/v3/docs/API.md#others |
This definitely works (I've done it in production a number of times). Something outside of the library or with your configuration is likely wrong, which falls into the category of a usage question. |
Yes @mshwery, I am having this issue as well and it is definitely a bug. It seems you have to explicitly assign css props via the |
We don't do anything to Again, this isn't something with our library, but with your configuration or tooling. Something else is intercepting and filtering out the |
Here's proof: https://codesandbox.io/s/20v898125p |
You are correct. It started working for me but is very brittle it seems: prefers to remove the class prop. Thanks |
Version
3.0.5
Steps to reproduce
renderToString
,RouterContext
andmatch
className
prop to<Link />
Expected Behavior
I expect to see the
class
attribute have the value of theclassName
prop on the generated anchor tag.Actual Behavior
The
class
attribute is missing on the generated anchor tag. OtherclassName
props are correctly applied on non-react-router components.The
match
function:The
<Link />
component withclassName
prop:The output of this component:
The text was updated successfully, but these errors were encountered: