question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Failed prop type: Invalid prop `data` of type `object` supplied to `Carousel`, expected `array`.

See original GitHub issue

Even so I use the following code:

<Carousel
data={ this.images instanceof Array ? this.images : [] }
... />

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
bitcoinvsaltscommented, Oct 25, 2017

Not sure why this issue is closed, I still have the issue:

[exp] Warning: PropTypes has been moved to a separate package. Accessing React.PropTypes is no longer supported and will be removed completely
in React 16. Use the prop-types package on npm instead. (https://fb.me/migrating-from-react-proptypes)
- node_modules\expo\src\Logs.js:187:24 in newConsoleFunc
- node_modules\fbjs\lib\warning.js:35:20 in printWarning
- node_modules\fbjs\lib\warning.js:59:25 in warning
- node_modules\react\cjs\react.development.js:2133:18 in get
* components\DropdownAlertProvider.js:10:20 in <unknown>
- node_modules\metro-bundler\src\Resolver\polyfills\require.js:174:12 in loadModuleImplementation
* App.js:3:0 in <unknown>
- node_modules\metro-bundler\src\Resolver\polyfills\require.js:174:12 in loadModuleImplementation
- node_modules\expo\AppEntry.js:2:0 in <unknown>
- ... 3 more stack frames from framework internals

Here is my code:

<Carousel
                    data={ this.props.property.images instanceof Array ? this.props.property.images : [] }
                    renderItem={ this.renderItem }
                    sliderWidth={width}
                    itemWidth={width}
                    inactiveSlideScale={1}
                    inactiveSlideOpacity={1}
                    enableMomentum={true}
                    activeSlideAlignment={'start'}
                    apparitionDelay={1500}
                    autoplay={true}
                    autoplayDelay={1900}
                    autoplayInterval={2500}
                    containerCustomStyle={{}}
                    contentContainerCustomStyle={{}}
                    removeClippedSubviews={false}
                    loop={false}
                  />
0reactions
schumanndcommented, May 23, 2019

I am experiencing this error now in conjunction with mobx ObservableArray.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Failed prop type: Invalid prop `data` of type `object ...
I am using react-native-snap-carousel, It worked fine, It fetches data fine but i am ...
Read more >
Warning: Failed prop type: Invalid prop `data` of type ... - GitHub
The error you're currently facing has nothing to do with the original issue: it's a warning from React before version 16 (see this...
Read more >
type check failed for prop "data". Expected Object, got Array
I'm using laravel-vue-pagination getting this error Invalid prop: type check failed for prop "data". Expected Object, got Array. code is. Copy Code
Read more >
invalid prop `rows` of type `object` supplied to `forwardref ...
Warning : Failed prop type: Invalid prop rows of type object supplied to ForwardRef(DataGrid), expected array.` Update after i remove the Object.fromEntries.
Read more >
Invalid prop 'value' of type 'object' supplied to 'TextInput' React ...
Coding example for the question Failed prop type: Invalid prop 'value' of type 'object' supplied to 'TextInput' React Native-React Native.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found