I have a reducer which returns an array of slides.
const initialState = {
slides: []
};
I have added a PropType of Array in the component.
Homepage.propTypes = {
slides: React.PropTypes.array
};
The problem is that I receive this warning when the component gets rendered. However I am returning array from the reducer.
Warning: Failed prop type: Invalid prop
slidesof typeobjectsupplied toSlider, expectedarray.

I checked in console and when the component is rendered the first time it receives an object of type List in slides prop but after the data is fetched from API it then displays array.
What should I do to remove this warning?
This is a usage question, and really not even related to React Redux at all - it's React-specific.
That said, I suppose you could do something like PropTypes.oneOf([PropTypes.array, PropTypes.object]) or something. There's also a third-party package of PropTypes types for Immutable data structures out there that you could use with this as well.
Most helpful comment
This is a usage question, and really not even related to React Redux at all - it's React-specific.
That said, I suppose you could do something like
PropTypes.oneOf([PropTypes.array, PropTypes.object])or something. There's also a third-party package of PropTypes types for Immutable data structures out there that you could use with this as well.