DEV Community

Discussion on: A 10 Line React Accordion Using an HTML Tag!

Collapse
 
eavichay profile image
Avichay Eyal

So basically you say you need react to put html that has already the full functionality.

Collapse
 
dpkahuja profile image
Deepak Ahuja πŸ‘¨β€πŸ’» • Edited

Hi Avichay, thanks for reading!

We need some sort of state management which we don’t get in plain HTML. We won’t be able to generate dynamic content or wonderful components under summary, or decide which sections to open, if it wouldn’t have been with react ( or any other UI lib/fw)

But yes HTML CSS has been advanced a lot.

Collapse
 
eavichay profile image
Avichay Eyal

I'm not following. What has react got to do with state management? React is a component rendering library. State management librariea has nothing to do with react, they either integrate with it or not

Thread Thread
 
dpkahuja profile image
Deepak Ahuja πŸ‘¨β€πŸ’»

"State management" here means component remembers during each render "what" sections to show and what to hide. I am not talking about external state management libraries.
Here, it means maintaining what open sections are (my examples don't maintain a list of what all sections are open at a given time, because this is not needed for basic examples, but we can certainly add it, if you need to allow only one section open at a time or whatever)
What has react got to do with state management?
I suggest you give a read about why these libraries/fws came after jQuery. Also, in depth explanation on react
here
Also, react, angular, vue. They all have something to do with state management.
here