I want to achieve drop down options in Flatlist, I have used React native popup Menu and in App.tsx I have declared the entry point as MenuProvider. I am getting this error.
Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<MenuProviderProps, any, any>> & Readonly<...> react-native-popup-menu MenuProvider typescript
The problem may be due to incorrectly resolved dependencies. If you are using react 17 try adding the following lines to your package.json:
"resolutions": {
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2"
}
This will force dependency versions marked as "*" to resolve to the specified versions in your json and should fix the issue, or at least it worked for me. If you don't specify the "resolutions" property, dependencies marked as "*" will automatically resolve to react 18, causing the error.
Please also note that this question should be tagged as "react-native-popup-menu" too, to allow the community to track the topic.