1
votes

I am using react-native-snap-carousel, It worked fine, It fetches data fine but i am getting 2 warnings in that app.

  1. Warning: Failed prop type: Invalid prop data of type boolean supplied to Carousel, expected array.
  2. Warning: Failed prop type: The prop dotsLength is marked as required in Pagination but it's value is Undefined.

1 brother from comments helped me and my problem is solved now, That's why i am removing code, Because that was my company's code, and i don't have permission to share code for long time after getting answered. Thanks.

1
Can you log value of msgResponse?Barcenal
let me show you the dataZain Shabir
I have updated the code with logs screenshots, please checkZain Shabir

1 Answers

1
votes

for the first issue, I see that the msgResponse is inconsistent

 const msgResponse = responseMsg._embedded && responseMsg._embedded.items ? responseMsg._embedded.items : ''

array / string depending on the case

try:

 const msgResponse = responseMsg._embedded && responseMsg._embedded.items ? responseMsg._embedded.items : []