in the componentDidMount function I can use this.refs['test'] get this component, but use this.refs['list'] will get a error. I try use 'ref={list=> { this.list = list}' to add a ref for the component, and use 'this.list' to get the component, and It's also a error. So who can I get the component.
return(
<View style={MainStyles.body}>
<TopView selectAll={() => this._selectAll()} />
<TabView ref={(ref) => this.tabView = ref}
switchTab={(index) => this._switchTab(index)}/>
<MyListView style={MainStyles.listView}
ref='test'
refresh={(okCall, failCall) => this._refresh(this, okCall, failCall)}
loadMore={(okCall,failCall) => this._loadMore(this, okCall, failCall)}
/>
<PageView style={MainStyles.content}
ref={viewPager => { this.viewPager = PageViewWrapper(viewPager)}}
onPageSelected={(e) => this._onPageSelected(e, this)}
>
<MyListView style={MainStyles.listView}
ref='list'
refresh={(okCall, failCall) => this._refresh(this, okCall, failCall)}
loadMore={(okCall,failCall) => this._loadMore(this, okCall, failCall)}
/>
<MyListView style={MainStyles.listView}
ref={(ref) => this.myList1 = ref}
refresh={(okCall, failCall) => this._refresh(this, okCall, failCall)}
loadMore={(okCall,failCall) => this._loadMore(this, okCall, failCall)}
/>
</PageView>
</View>
)