How to list array from state in reactjs?
<p>I just started looking at reactjs and trying to display a list of items from state, this is a fragment of my main component:</p>

<pre><code>const render = () =&gt; ReactDOM.render(
  &lt;div&gt;
    &lt;AddButton

      addToList={() =&gt; store.dispatch(
        {
          type: 'ADDTEXT',
          payload: {
            text: 'this is a text'
          }
        }
      )}
    /&gt;

    &lt;List items="store.getState()"&gt;&lt;/List&gt;
  &lt;/div&gt;

  ,
  rootEl
)
</code></pre>

<p>I was hoping to inject the state into the list which is an array.
List looks like this:</p>

<pre><code>import React, { PropTypes } from 'react'
import Item from './Item'

const List = ({ items }) =&gt; (
  &lt;ul&gt;
    {items.map(item =&gt;
      &lt;Item
        key={item.id}
        {...item}

      /&gt;
    )}
  &lt;/ul&gt;
)
//


export default List
</code></pre>

<p>However I am getting this error:</p>

<pre><code>Uncaught TypeError: items.map is not a function
</code></pre>

<p>The complete code sits in:<a href="https://github.com/dimitri-a/counter_react/examples/counter" rel="nofollow">https://github.com/dimitri-a/counter_react/examples/counter</a></p>