C
C
Captain Cocoa2021-06-30 09:40:30
React
Captain Cocoa, 2021-06-30 09:40:30

In a React + Redux application, how to display the Nav component on click in the Header component?

There is a component <Header />
Inside it there is a "hamburger" icon on click on which the following should happen:

1. the "active" class should be added to the icon so that I can replace the "hamburger" with the "close" icon
2. in a separate component <Nav />to the block with the menu should the "active" class is added to visually display the pop-up menu.

How to do this purely through the useState hook is clear. But I want to understand. how to do it via Redux connect(), with actions and container components. So that everything is Feng Shui.

Is there somewhere an example of such an implementation, where you can read, or see something similar to what I need?
Code example: https://codesandbox.io/s/lucid-feynman-pg1v2?file=...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question