score:0

if you need to show only one card the best way to keep state in the parent component.

for example

parentcomp -> 
state: openedchapterid = someid
setopenedchapter(id) => setstate({openedchapterid: id});

so, when you try to render your children you can able to compare currentid.

<chapteractions isopened={chapterid === openedchapterid} handlemenuclick={() => setopenedchapter(chapterid)} />

Related Query

More Query from same tag