I have the following render function:
render() {
var items = this.props.items;
var lists = this.props.lists;
var addItem = this.props.addItem;
return (
<div key={uuidv4()}>
{lists.map(function(listName) {
return (
<List name={listName} items={items[listName]} addItem={addItem.bind(this)} key={uuidv4()} />
)
})
}
</div>
);
}
}
could some provide a reference for the {} that surrounds the map function. I can't seem to find where to look. Do you just use that notation to execute inside the return of render?
This is not a node.js or javascript but a JSX syntax
You can pass any JavaScript expression as children, by enclosing it within {}