FAQ Component in React
Inside <FAQComponent /> it maps through the data to create a <Collapsible /> component for each, and also passes the index of each object. Inside the <Collapsible /> there is a <details> with a <summary> as the question. And the hidden <details> is the answer. Details is open if index is 0.
Requested feedback
Please let me know of any way I can dry this code up and make it any more efficient! Open to any feedback. Thanks :)