react-native-countdown-component icon indicating copy to clipboard operation
react-native-countdown-component copied to clipboard

Maximum update depth exceeded

Open Bayramito opened this issue 4 years ago • 3 comments

Hello,

Im getting this error below when i use the Countdown component inside a FlatList item.

Ekran Resmi 2021-06-01 10 38 02

I calculate the time until time like below.

  const date = parseInt(new Date(props.item.finished_date).getTime() / 1000);
  const today = parseInt(new Date().getTime() / 1000);

And here is my Component.

NOTE: this is a renderItem component for the FlatList

      <CountDown
        style={{
          position: "absolute",
          top: 0,
          zIndex: 999,
          backgroundColor: colorsComponent.backgroundColorGreen,
          alignSelf: "center",
          borderBottomLeftRadius: 5,
          borderBottomRightRadius: 5,
        }}
        until={date - today}
        size={15}
        onFinish={() => {}}
        digitStyle={{height: 20}}
        digitTxtStyle={{color: "#fff"}}
        timeLabelStyle={{...textStyles().boldWhite, ...textStyles().fontSize10}}
        timeToShow={["H", "M", "S"]}
        timeLabels={{h: "Sa", m: "Dk", s: "Sn"}}
      />

Env.

  "react-native": "0.63.4",
   "react-native-countdown-component": "^2.7.1",

Bayramito avatar Jun 01 '21 07:06 Bayramito

hello, im facing this problem too. did u find a solution for it?

tearjuIce avatar Jun 17 '21 07:06 tearjuIce

Same problem :(

glennperez avatar Oct 18 '22 17:10 glennperez