Hi everyone!
I'm facing the following situation, maybe someone can help me.
The issue is that I'm rendering the content of the swiper from props and the component card has some active buttons that have to be updated when the user dispatch an action, but if I update the props with redux actions the Swiper don't get aware with the new props updated and it doesn't re-render the card content.
I noticed that the Swiper calls the method shouldComponentUpdate but it returns false because the props.cardIndex === nextProps.cardIndex. But the prevProps are different from the new ones. Is there a prop like the extraData prop that use the FlatList to force a render??
Hi everyone! I'm facing the following situation, maybe someone can help me. The issue is that I'm rendering the content of the swiper from
props
and the component card has some active buttons that have to be updated when the user dispatch an action, but if I update the props with redux actions the Swiper don't get aware with the new props updated and it doesn't re-render the card content.I noticed that the Swiper calls the method
shouldComponentUpdate
but it returns false because theprops.cardIndex === nextProps.cardIndex
. But theprevProps
are different from the new ones. Is there a prop like theextraData
prop that use the FlatList to force a render??So, what would you recommend? Thanks in advance.