Dynamic keys using Immutable.js
<p>I'm using Redux, but NOT React to provide a bit of context. I have a situation where I would like to store some data about pages a user has visited, but it seems like I need to set my schema prior to setting any new state in a reducer. </p>

<pre><code>function reducer(state, action) {
    switch(action.type) {
        case STORE_CATEGORY:
            return Object.assign(
                {}, state,{
                    [action.category] : {
                        pages: [],
                        filters: {}
                    }
                }
            );
    }
}
</code></pre>

<p>The above function works, but I want to translate updating the state with an undetermined set of keys using immutable.js where the keys will be named after the category visited. Thanks.</p>