Hi, I'm new to the react world and learning. I'm creating my app template, but I can't solve this problem.
I'm creating a layout component and i'm inserting inside header, sidebar, footer, main.
What I can't do is insert the button that opens and closes the sidebar inside the header.
If the button I insert it in the layout component, everything works fine, but how do I insert the button inside the header? The toggle class active button to the sidebar and the body container div.
I have to insert the button in the Header component, how do I do it?
I posted the code here, can you help me please?
https://codesandbox.io/embed/nostalgic-wildflower-w81pmq?fontsize=14&hidenavigation=1&theme=dark
Top comments (0)