Description
Getting the property 'style' not defined error while using in TypeScript:
(JSX attribute) style: { backgroundColor: string; } No overload matches this call. Overload 1 of 2, '(props: ToastComponentProps | Readonly<ToastComponentProps>): Toast', gave the following error. Type '{ ref: (toast: Toast | null) => void; style: { backgroundColor: string; }; position: "bottom"; positionValue: number; fadeInDuration: number; fadeOutDuration: number; opacity: number; textStyle: { ...; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Property 'style' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Overload 2 of 2, '(props: ToastComponentProps, context: any): Toast', gave the following error. Type '{ ref: (toast: Toast | null) => void; style: { backgroundColor: string; }; position: "bottom"; positionValue: number; fadeInDuration: number; fadeOutDuration: number; opacity: number; textStyle: { ...; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Property 'style' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'.ts(2769)
Found one pull request #97 with the fix for the same, but seems like not merged yet.