react-tinder-card
react-tinder-card copied to clipboard
Incompatible with RN 0.66.0 and React 17.0.2
React 18 now needs to you explicitly add a children property e.g. {children?: ReactNode}. I got this type error when I upgraded react.

Workaround
type TinderCardProps = Parameters<typeof TinderCard>[0]
type TinderCardPropsWithChildren = TinderCardProps & { children?: ReactNode }
const TinderCardWithChildren: FC<TinderCardPropsWithChildren> = TinderCard
Worked like a charm! Just didn't realize that you were supposed to use TinderCardWithChildren in place of the normal TinderCard.
Ah sorry, maybe that wasn't clear. It's just a type cast to add the missing type information. Glad that helped!