A native iOS UITableView wrapper for React Native with JSON support
There's a lot going on around the React Native ListView and its performances, including in the official committee.
Pavlo Aksonov is offering a different angle by providing a wrapper around the Native iOS UITableView for covering different uses not really suited for a ListView.
react-native-tableview (Example)
Why I need to use it?
- To display long lists of data (like country list) - built-in list view has performance issues for long lists
- To use built-in accessory types (checkmark or disclosure indicator)
- Automatic scroll to initial selected value during component initialization
- Automatic item selection with "checkmark" with old item de-selection (optionally), see demo, useful to select country/state/etc.
- Native JSON support for datasource. If you need to display large dataset, generated Javascript will became very large and impact js loading time. To solve this problem the component could read JSON directly from app bundle without JS! Filter JSON datasources using NSPredicate syntax. For example you could select states for given country only (check demo)
render(){
return (
<TableView selectedValue="ES" style={{flex:1}} json="countries"
tableViewCellStyle={TableView.Consts.CellStyle.Subtitle}
onPress={(event) => console.log(event)}/>
);
}