Fragment keys collide
Review this React TypeScript grouped table.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix, specific and kind.
0:00 of about 20 min
Mark a line and say what kind of problem it is.0 findings
1function GroupedRows({ groups }: { groups: Group[] }) {
2 return (
3 <tbody>
4 {groups.map((g) => (
5 <>
6 <tr key={g.id} className="header"><td>{g.name}</td></tr>
7 {g.items.map((it) => (
8 <tr key={it.id}><td>{it.label}</td></tr>
9 ))}
10 </>
11 ))}
12 </tbody>
13 );
14}
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.