Compound Components in ReactJS - a really easy but effective accordion component

preview_player
Показать описание
I'm building a FAQs section with React using a light-weight compound components pattern, which makes it highly controllable, modular and flexible. The code is easy to read and understand and broken down into multiple individual parts for effortless housekeeping, updating and reuse. Each component is styled using the "styled-components" plugin. Compound Components are an advanced React pattern.

I took this example from an article by Ichoku Chinonso:
Definitely worth a read!

I changed the code a bit. See the GitHub repo here for my code:

My Portfolio:

My LinkedIn:
Рекомендации по теме
welcome to shbcf.ru