Closed ImAbhishekTomar closed 3 years ago
Couldn't find version numbers for the following packages in the issue:
npm
yarn
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
Try downgrading types for react native to npm i @types/react-native@0.62.2
It's fixed after downgrade types..
Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.
Is there a working version with a fix for this somewhere? Downgrading to an earlier version feels like a temporarily solution. And I actually haven't been able to get it to work with @types/react-native@0.62.2
.
I still get this error
I'm still getting this error now:
No overload matches this call.
Overload 1 of 2, '(props: Pick<Props, "ref" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | ... 55 more ... | "contentStyle"> & { ...; }, context?: any): ReactElement<...> | ... 1 more ... | null', gave the following error.
Type '(ev: any) => void' is not assignable to type '() => void'.
Overload 2 of 2, '(props: PropsWithChildren<Pick<Props, "ref" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | ... 55 more ... | "contentStyle"> & { ...; }>, context?: any): ReactElement<...> | ... 1 more ... | null', gave the following error.
Type '(ev: any) => void' is not assignable to type '() => void'.ts(2769)
Button.d.ts(52, 5): The expected type comes from property 'onPress' which is declared here on type 'IntrinsicAttributes & Pick<Props, "ref" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | ... 58 more ... | "contentStyle"> & { ...; }'
Button.d.ts(52, 5): The expected type comes from property 'onPress' which is declared here on type 'IntrinsicAttributes & Pick<Props, "ref" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | ... 58 more ... | "contentStyle"> & { ...; } & { ...; }'
(JSX attribute) onPress?: (() => void) | undefined
Function to execute on press.
<RNPButton
onPress={() => {
console.log('pressed');
}}
{...otherProps}
/>
I have the same error in react-native-paper-dates now..
same problem here, downgrading to @types/react-native@0.62.2
didn't work for me
Somethings you could jus be missing required props from a component .i.e Button Component requires a "title" prop as well as "onPress". Just use the ctrl+space bar to check missing props
Getting a similar error with apexCharts
No overload matches this call.
Overload 1 of 2, '(props: Props | Readonly
. It seems the issue persists. Could we explore alternative solutions that do not involve downgrading?
Most of the component showing "No overload matches this call." this error message, (Already Tryed #2482,#1971)
Packages (Using Yarn)
ERROR
PACKAGE