3 ms·
Well, I guess my response here is that you've got more of a show/hide multiple sections thing a-la Jenkins than an accordion--which is more of a "show one secti
by camgunz 5y ago
Well, I guess my response here is that you've got more of a show/hide multiple sections thing a-la Jenkins than an accordion--which is more of a "show one section at a time" thing. Thus there's no real top-level state to keep track of, each section knows whether of not it's displaying.
And that's why I was saying you have to be careful about what you put in an accordion. It's (usually) not like section 1 is gonna be drastically different than section 8.
I suppose my point, which I'm kind of getting a better grip on now, is that this post isn't so much about "implicit state in compound components" but rather "where does state live when components kind of depend on each other", which like, describes a web app. The compound components/accordion thing is a red herring; anything could go in here: form validation feedback, notifications, etc. etc. etc.