I'm using the Map class.
I have a state like this:
{
rows: new Map([])
}
With each row representing an entry in a table. I'd like to update each row independently and asynchronously in a thread-safe manner.
What is the idiomatic React way to perform a setState when each modification is something like this (assume "fooId" has already been inserted into the Map):
const rows = this.state.rows;
const row = rows.get("fooId");
row.status = '75%';
this.setState({
rows: rows
});