Skip to content

Commit

Permalink
include ref explicitly in type for inference
Browse files Browse the repository at this point in the history
  • Loading branch information
JDMathew committed Aug 1, 2024
1 parent 5edca74 commit 03bf8d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/forms/src/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { InteractionManager } from 'react-native';

export type FormProps = React.PropsWithChildren<{
onSubmit: () => boolean | Promise<boolean>;
ref?: React.RefObject<FormActions>; // need to explicitly type for inference in <Form /> component
}>;

export type FormActions = {
Expand Down

0 comments on commit 03bf8d2

Please sign in to comment.