KPS250 / react-native-flatlist-slider

React Native Image Slider with FlatList
186 stars 46 forks source link

ReferenceError: Can't find variable: Indicator #18

Closed jorge-o-murillo closed 3 years ago

jorge-o-murillo commented 3 years ago

Thanks for the work on the component.

I'm on React Native v0.63.2 and running the component out of the box greets me with this error:

ReferenceError: Can't find variable: Indicator ReferenceError: Can't find variable: ChildItem

I made the following changes to each respective file and got it to work:

const Indicator = ({
  itemCount,
  currentIndex,
  indicatorStyle,
  indicatorContainerStyle,
  indicatorActiveColor,
  indicatorInActiveColor,
  indicatorActiveWidth = 6,
}) => {
  return (
    <View style={[styles.container, indicatorContainerStyle]}>
      {renderIndicator(
        itemCount,
        currentIndex,
        indicatorStyle,
        indicatorActiveColor,
        indicatorInActiveColor,
        indicatorActiveWidth,
      )}
    </View>
  );
};

export default Indicator;

I wonder if other users have this issue as well.

kommandantee commented 3 years ago

I re-run the project with "npx react-native run-android" after this component installation and it solved.