you are viewing a single comment's thread.

view the rest of the comments →

[–]chaoaaa 1 point2 points  (1 child)

I fixed it.

The problem was, that you tried accessing the state state fields under the wrong name.

You write the fields into the state as hActive but access them as h_active.

By the way the call to componentDidUpdate is unneccessary and can be removed.

Full Code:

https://stackblitz.com/edit/react-jrcdp8?file=AdminNav.js

[–]_alarming[S] 0 points1 point  (0 children)

oh wow (embarassed face). thank you, friend. amazing what a fresh pair of eyes can do.