Skip to content

Commit

Permalink
Merge pull request #222 from w3bdesign/Remove-useState-antipattern
Browse files Browse the repository at this point in the history
Remove useState antipattern
  • Loading branch information
w3bdesign authored Jul 21, 2020
2 parents af16ba4 + 8020bfd commit ca86b25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Header/Hamburger.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Hamburger = () => {
id="hamburgersvg"
style={showHamburgerHideXAnimation}
onClick={() => {
setisExpanded(!isExpanded);
setisExpanded(prevExpanded => !prevExpanded);
}}
className="text-gray-900 fill-current"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -73,7 +73,7 @@ const Hamburger = () => {
<animated.svg
id="xsvg"
onClick={() => {
setisExpanded(!isExpanded);
setisExpanded(prevExpanded => !prevExpanded);
}}
style={showXHideHamburgerAnimation}
xmlns="http://www.w3.org/2000/svg"
Expand Down

0 comments on commit ca86b25

Please sign in to comment.