I have an immutable state in React, where I have an map containing list elements.
My getIn function works correctly, e.g.:
console.log(this.state.settings.getIn(["airlines"])[index].checked);
But I want to update this value with the reverse.
Reading the docs of immutable JS, it should be something like this, but due to my index key I can't get it to work, since my update val should be within the ().
What I currently have is something like this:
this.state.settings.updateIn((["airlines"])[index].checked, val => !val);
Any help is appreciated!