Example Table multiple columns of checkboxes
Imagine that I have a table with multiple columns. Some columns are made up entirely of checkboxes. How would you manage the state for that table?
When I click a checkbox, I imagine that I would want to dispatch an action to update the redux state with some unique identifier for that column, and then the index of the row. For instance:
column1: [0,1,5,10]
column2: [2,3,6]
If I click column2, row 1, column2 would update to:
column2: [0,2,3,6]
Where column# is the key for that column, and each number in the array is the row.