Formerly a banker and tech startup founder. Now on my 3rd career as a full stack software engineer (with a front end focus). Posts on tech and things learnt on my programming journey. 👩🏻💻
Formerly a banker and tech startup founder. Now on my 3rd career as a full stack software engineer (with a front end focus). Posts on tech and things learnt on my programming journey. 👩🏻💻
yeah! I used your article as a roadmap to implement an accordion on my React App menu! Thanks Julia!
A tiny suggestion (and as a thank you note)
setActive(active === false ? true : false)
to
setActive( !active )
Keep on coding in the free world!
I'm so glad you found this useful. Ah, that's a great spot - thank you! :)
Thinking about it more, perhaps this is even better to ensure it's fail-safe! :)
setActive((prevState) => !prevState)