bier hier bier hier - 12 days ago 4x
React JSX Question

How to list array from state in reactjs?

I just started looking at reactjs and trying to display a list of items from state, this is a fragment of my main component:

const render = () => ReactDOM.render(

addToList={() => store.dispatch(
type: 'ADDTEXT',
payload: {
text: 'this is a text'

<List items="store.getState()"></List>


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

import React, { PropTypes } from 'react'
import Item from './Item'

const List = ({ items }) => (
{ =>


export default List

However I am getting this error:

Uncaught TypeError: is not a function

The complete code sits in:


you shouldn't pass items as a string store.getState(). Try this :

<List items={store.getState()}></List>