It is not an array as a key, it is an es6 way to use a variable (/ computed property) as a key. Consider this:
var a = "foo"; function getKey() { return "myKey"; } var obj = { [a] : "bar", [getKey()] : "baz" }; console.log(obj.foo);
So, [action.subreddit] just sets the key name for any action.subreddit value.
source share