React Native Animated Tabs & Animated Indicator using FlatList

125 Views Asked by At

I have followed the course on YouTube and implemented it. React Native Animated Tabs & Animated Indicator using FlatList. But i have small issue with measureLayout

Source: https://www.youtube.com/watch?v=ZiSN9uik6OY&t=337s

Expo: https://snack.expo.dev/@tiendung1601/react-native-expo-examples?platform=android

The problem here is that when running the app for the first time, the whole value of measures is 0, and the indicator is not showing. If we press the save button, then the indicator will show and the value of the measures will be updated.

The error:

 measures:  [{"h": 0, "w": 0, "x": 0, "y": 0}, {"h": 0, "w": 0, "x": 0, "y": 0}, {"h": 0, "w": 0, "x": 0, "y": 0}, {"h": 0, "w": 0, "x": 0, "y": 0}, {"h": 0, "w": 0, "x": 0, "y": 0}]

Can anybody identify the issue?

0

There are 0 best solutions below