This repository has been archived by the owner on Aug 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Link and NavLink react-router-dom components :hover not working #907
Comments
I'd close this since is duplicated: #398 |
Definitely not fixed with the workaround when using React Router v4.2.2 and Radium v0.19.4. Minimal, Complete, and Verifiable Example: import React from "react";
import { render } from "react-dom";
import { BrowserRouter, Link, NavLink } from "react-router-dom";
import Radium from "radium";
const RadiatingNavLink = Radium(NavLink);
const RadiatingLink = Radium(Link);
const App = () =>
<BrowserRouter>
<div>
<div>
<RadiatingNavLink
to="/test1"
style={{ background: "red", ":hover": { background: "green" } }}
activeStyle={{ background: "cyan" }}
>
test1
</RadiatingNavLink>
</div>
<div>
<RadiatingNavLink
to="/test2"
style={{ background: "red", ":hover": { background: "green" } }}
activeStyle={{ background: "cyan" }}
>
test2
</RadiatingNavLink>
</div>
<div>
<RadiatingNavLink
to="/test3"
style={{ background: "red", ":hover": { background: "green" } }}
activeStyle={{ background: "cyan" }}
>
test3
</RadiatingNavLink>
</div>
<div>
<RadiatingLink
to="/test3"
style={{ background: "red", ":hover": { background: "green" } }}
>
LinkTest
</RadiatingLink>
</div>
</div>
</BrowserRouter>;
render(<App />, document.getElementById("root")); |
Yes, it is not working using React Router v4.2.0 and Radium v.0.19.5. Any other workaround? |
My temporary solution: remix-run/react-router#5496 |
@yonasstephen I'm also facing the similar problem,not working with React Router4.2.0 |
I use Glamor (https://github.com/threepointone/glamor) like this:
|
Any update on this? @Nimelrian answer works for me. |
Bumping this, an issue for me now and none of the workarounds above work. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The hover does not work on react router components.
Sure I could simply style a span inside but where's the fun in that?
The text was updated successfully, but these errors were encountered: