Skip to content

My navbar doesn't collapse / uncollapse with the NavbarToggle component #2454

Answered by GuyoST
GuyoST asked this question in Q&A
Discussion options

You must be logged in to vote

Hi again,

I finally made it work.
For people who have the same problème, change the NavbarToggler like this :

<NavbarToggler className="me-2" onClick={() => setCollapsed(!collsapsed)}    />

and add a state : const [collsapsed, setCollapsed] = useState(true)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GuyoST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant