redux - reducer state is blank
<p>I am trying to replicate something similar to the TodoList example in the the redux <a href="http://redux.js.org/docs/basics/Reducers.html" rel="noreferrer">docs' basic example</a>. The second reducer receives an array - <code>styleItems = [{... ... }, {... ...}]</code> -  and then calls the first function to act on each of the individual objects.</p>

<p>I provide an <code>initialState</code> to the app container via the following, as shown in <code>containers/app.js</code>.  However, the state passed to the <code>styleItems</code> reducer seems to be a blank array - each and every time.</p>

<p>However, react renders the UI based on the initial config, and react dev-tools shows the state structure as expected.  Is the redux store somehow seeing the same thing as react?</p>

<p><strong>containers/app.js</strong></p>

<pre><code>function starterInfo(state) {
    return {

        // The ID of this particular object
        id: 12345,

        // Various keys and theri css values
        styleItems: [
            {
                pk: 31,
                order: 1,
                label: 'Caption text color',
                css_identifier: '.caption-text',
                css_attribute: 'color',
                css_value: '#FFFFFF'
            },
            {
                pk:23,
                order: 2,
                label: 'Caption link color',
                css_identifier: '.caption-link',
                css_attribute: 'color',
                css_value: '#FEFEFE'
            }
        ],

        // Network state info
        currently_fetching: false,
        currently_posting: false
    }
}

export default connect(starterInfo)(App)
</code></pre>

<p><strong>reducers/index.js</strong></p>

<pre><code>// This handles a single styleItem object within the array
function change_css(state = {}, action){
    switch (action.type){
        case actions.CHANGE_CSS:

            if (state.order !== action.order){
                return state
            }

            return {
                ...state,
                css_value
            }

        default:
            return state
    }
}

// This handles the styles array in the global state
function styleItems(state = [], action){
    switch(action.type){       
        case actions.CHANGE_CSS:

            const foobar = state.map(styleItem =&gt;
                change_css(styleItem, action)
                )            

            return foobar

        default:
            return state
    }
}
</code></pre>