Reputation: 818
Do that
render() {
var elems = this.props.items.course_list;
console.log(elems);
return (
<div>
</div>
)
}
Result:
Try access to course_list by this:
render() {
var elems = this.props.items.course_list;
console.log(elems.course_list;);
return (
<div>
</div>
)
}
Get undefined.
Have object course_list that include array course_list, I can't access to this array
This screen for
var elems = this.props.items; console.log(elems);
Upvotes: 0
Views: 146
Reputation: 281646
You may need to convert the immutable object to a javascript object ot access the inner elements. In that case use getIn()
. I hope it helps
var mystore = state.getIn(['incomeProfileList'])['course_list'];
var copy = Object.assign({}, mystore);
console.log(copy.course_list);
Upvotes: 1