Reshaping API databeginner
The shape an API returns is almost never the shape your UI wants; turning snake_case rows with flags into the objects your components render is most of frontend work.
Turn the rows an API actually returns into the shape your table wants to render.
toUserRows turns the API rows into exactly the UI shape, with no snake_case left.
Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.
The shape an API returns is almost never the shape your UI wants; turning snake_case rows with flags into the objects your components render is most of frontend work.
A type is a note to your future self that the compiler checks — annotating what goes in and what comes out is where most of the value is, before any advanced feature.