MD Aslam Ansari
MD Aslam Ansari

Reputation: 1565

[Error]TypeError :expected dynamic type 'double',but had type string in React Native

Currently getting an error when ever clicking on a react TouchableOpacity control.

enter image description here

Upvotes: 2

Views: 1067

Answers (2)

Mike M
Mike M

Reputation: 4436

Using <TouchableHighlight> instead of <TouchableOpacity> will prevent the crash and you can still use the transform.

Upvotes: 0

MD Aslam Ansari
MD Aslam Ansari

Reputation: 1565

I was able to fix by removing the transform from StyleSheet.

 transform: [
      {
        rotate: '45deg'
      }
    ]

Upvotes: 4

Related Questions