React Native : JSON value <null> of type NSNull cannot be converted to NSString

You, JavaScriptES6
Back

I recently came across this weird errors and tried to figure out why it is happening, the project used GraphQL on Appolo Client over Hapi server. After debugging line by line code the issues was form the Image component. It appeared to be that the Image source is empty on some rows on the list so I set a dummy image URL to fix it and it worked.

JSON value <null> of type NSNull cannot be converted to NSString

And use Image as

<Image
          source={image ? image : 'https://imgplaceholder.com/72x80'}
/>
© Heshan Wanigasooriya.RSS

🍪 This site does not track you.