react-native-motion icon indicating copy to clipboard operation
react-native-motion copied to clipboard

Cannot read the property 'measure' of null

Open Yandamuri opened this issue 5 years ago • 4 comments

I am using react-native-motion along with react-router-native

I have FlatList with list of items where each item is wrapped with ShareElement like this,

  <SharedElement id={'source'}>
                <View style={cardFirstView}>
                    <View style={{width: item.imageurl ? '80%' : '100%'}}>
                        <Text type={'bold'} numberOfLines={1} ellipsizeMode={'tail'} style={equipmentName}>{displayname}</Text>
                        <Text numberOfLines={1} ellipsizeMode={'tail'} style={[locationStyle, {marginTop: 5, color: location ? "#000000" : '#7e7e7e'}]}>{location ? location : "--- Location not specified ---"}</Text>
                    </View>
                </View>
  </SharedElement>

and then i did the same with detail page as follows,

      <SharedElement sourceId={'source'}>                
            <View style={headerStyle}>
                <View style={{flexDirection: 'row', alignItems: 'center'}}>
                    <TouchableOpacity onPress={() => this.props.history.goBack()} style={{padding: 10}}>
                        <GSIcons name={'backButton'} style={{height: 20, width: 20}} color={'white'} />
                    </TouchableOpacity>
                    <Text type={'bold'} numberOfLines={1} ellipsizeMode={'tail'} style={pageTitleStyle}>{displayname}</Text>
                </View>
                <Text style={subTitleStyle}>{contractType}</Text>
            </View>
      </SharedElement>

When detail page is opened by tapping on any of the FlatList item, Following error occurs, Screenshot_20200130_161742_com ybs servsmartgs 1

1.Can we use this package with 'react-native-router'? 2.If so, Please correct me if i am using the package in the wrong way. Thank You.

Yandamuri avatar Jan 30 '20 11:01 Yandamuri

Also having that issue

ChaossAdept7 avatar Apr 26 '20 12:04 ChaossAdept7

i have same issue

vantuan88291 avatar May 04 '20 08:05 vantuan88291

same + 100

gotexis avatar Jul 12 '20 14:07 gotexis

https://github.com/xotahal/react-native-motion/pull/41

Guys I've had the same problem and it seems that it was missing a return. I've done a pull request that seems to solve this problem, now we should wait for its review.

Credits to @robcoutinho who found this solution.

Stomari avatar Jul 24 '20 14:07 Stomari