I start with:
constructor() {
super();
this.state = {
lists: [\'Dogs\',\'Cats\'],
items: {Dogs: [{name: \"Snoopy\"}, {name: \"Lola\"
I wanted to add a bit more info about cloning arrays. You can call slice, providing 0 as the first argument:
const clone = myArray.slice(0);
The code above creates clone of the original array; keep in mind that if objects exist in your array, the references are kept; i.e. the code above does not do a "deep" clone of the array contents.