-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello,
I have a problem with the props onBack and onStart, when I try to add its inside my Gamepad component I have the following error:
No overload matches this call.
Overload 1 of 2, '(props: Readonly<Props>): Gamepad', gave the following error.
Type '{ children: Element; onA: () => void; onBack: () => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Gamepad> & Readonly<Props> & Readonly<{ children?: ReactNode; }>'.
Property 'onBack' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Gamepad> & Readonly<Props> & Readonly<{ children?: ReactNode; }>'.
Overload 2 of 2, '(props: Props, context?: any): Gamepad', gave the following error.
Type '{ children: Element; onA: () => void; onBack: () => void; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Gamepad> & Readonly<Props> & Readonly<{ children?: ReactNode; }>'.
Property 'onBack' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Gamepad> & Readonly<Props> & Readonly<{ children?: ReactNode; }>'. TS2769
52 | return (
53 | <div>
> 54 | <Gamepad onA={callA} onBack={callBack}>
| ^
55 | <React.Fragment />
56 | </Gamepad>
57 | <div( Same error with onStart )
In my package.json I add react-gamepad with SBRK/react-gamepad and onBack/onStart are in the src files.
It works when I use onButtonChange, but I don't understand why onBack and onStart are not found.
Regards,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels