You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just use this lib with redux-form and get these errors when compiling with typescript:
(13,33): Types of property 'component' are incompatible.
Type 'typeof Checkbox' is not assignable to type '"input" | "select" | "textarea" | ComponentClass<WrappedFieldProps & CheckboxProps> | StatelessCo...'.
Type 'typeof Checkbox' is not assignable to type 'StatelessComponent<WrappedFieldProps & CheckboxProps>'.
Type 'typeof Checkbox' provides no match for the signature '(props: WrappedFieldProps & CheckboxProps & { children?: ReactNode; }, context?: any): ReactElement<any> | null'.
The codes are:
import*asReactfrom'react';import{Field,reduxForm}from'redux-form';import{Checkbox,}from'redux-form-material-ui'importFormLabelfrom"@material-ui/core/FormLabel/FormLabel";letMonitorCrashForm=(props: any)=>{return(<formclassName='left-form'><FormLabelcomponent="legend">Howtoreceivethecrashalert:</FormLabel><Fieldname="email"component={Checkbox}label="Email?"/><Fieldname="slack"component={Checkbox}label="Slack?"/></form>)};exportdefaultreduxForm({// a unique name for the formform: 'monitorCrash'})(MonitorCrashForm)
Hi, I just use this lib with
redux-form
and get these errors when compiling with typescript:The codes are:
The versions are:
Looks like the declaration is wrong?
The text was updated successfully, but these errors were encountered: