final-form / final-form/react-final-form-hooks

react-native, typescript and HTMLElement

Open
#54 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
469
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Either I'm misunderstanding something, or there seems to be some space for improvement for using this with react-native and typescript. The hickup I bumped into was

```
export interface FieldRenderProps {
input: FieldInputProps;
meta: FieldMetaState;
}

....

interface FieldInputProps {
name: string;
onBlur: (event?: React.FocusEvent) => void;
onChange: (event: React.ChangeEvent | any) => void;
onFocus: (event?: React.FocusEvent) => void;
type?: string;
value: FieldValue;
checked?: boolean;
multiple?: boolean;
}
```

And, I'd venture, HTMLElement isn't something used in react-native. If you point me in the right direction, I would probably be able to put in the leg-work to make it work.

The library itself seems to be working fine.

Quick fix would be to use something like
```
FieldRenderProps
```

Contributor guide

Open the contributing guide

Research direction

The issue names the FieldRenderProps and FieldInputProps TypeScript declarations; start by locating those declarations and checking how their HTMLElement constraints are exposed to React Native consumers. Compare the existing React and React Native typing expectations, then verify that the library types work without requiring HTMLElement while preserving the current web usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.