tomzaku / react-native-shimmer-placeholder

Placeholder/ Skeleton of React Native
MIT License
1.06k stars 93 forks source link

NSMutableDictionary cannot be converted to a YGValue #52

Closed vishgoel007 closed 4 years ago

vishgoel007 commented 4 years ago

When i updated the package to its latest version starts encountering below error

JSON value '{x = 2; y = “0.5"; }' of type NSMutableDicitionary cannot be converetd to a YG Value

But looks like changing the start and end with startPoint and endPoint respectively in below code(in ShimmerPlaceholder.js) fixed the issue.

<LinearGradient
          colors={shimmerColors}
          style={{ flex: 1, width: width * shimmerWidthPercent }}
          start={{
            x: -1,
            y: 0.5,
          }}
          end={{
            x: 2,
            y: 0.5,
          }}
          locations={location}
        />

Update : After renaming the props it stopped animating.

tomzaku commented 4 years ago

Hi @vishgoel007 , Since the react-native-linear-gradient has been upgraded, so the API has been changed. So you can take a look of that docs.

tomzaku commented 4 years ago

If you still have problems, can u send me the environment? Are you using exp or react-native-linear-gradient? Which version are you using?