Skip to content

Version 3.0.0

Compare
Choose a tag to compare
@Jacse Jacse released this 06 Jul 17:10
· 33 commits to master since this release

Version 3.0.0 fixes some layout bugs and aligns the renderItem function more closely with that of FlatList.

Bugfixes:

  • Design issue with a hidden navigation bar in Android (#14)

Breaking changes

  • renderItem now receives {item, index, dimensions} in stead of {...item, height, width}. To migrate, just make sure to unpack the item and dimensions.

Migration to new renderItem

renderItem(props){
+   const {item, index, dimensions, bottomButton} = this.props;
    const style = {
-    backgroundColor: props.backgroundColor,
+    backgroundColor: item.backgroundColor,
-    width: props.width,
+    width: dimensions.width,
-    height: props.height,
+    flex: 1,
-    paddingBottom: props.bottomButton ? 132 : 64,
+    paddingBottom: bottomButton ? 132 : 64,
    };
    return (
      <View style={[styles.mainContent, style]}>
-       <Text style={[styles.title, props.titleStyle]}>{item.title}</Text>
+       <Text style={[styles.title, item.titleStyle]}>{item.title}</Text>
-       <Image source={props.image} style={props.imageStyle} />
+       <Image source={item.image} style={item.imageStyle} />
      </View>
    );
}