The built-in type for FormData in flow requires that the second argument to the append method is a string, Blob, or File. This conflicts with the react-native FormDataPart type defined in
Libraries/Network/FormData.js:
type FormDataPart = {
string: string,
headers: Headers,
} | {
uri: string,
headers: Headers,
name?: string,
type?: string,
};
Flow built-in types:
I have made a similar issue in the flow repository (https://github.com/facebook/flow/issues/3597).
I am not sure the approach to take here. I don't think we want to change the flow built-in type so it may require importing FormData directly from react-native or overwriting the type.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
Issue was labeled as stale, however as of latest react-native version, this is still an issue.
As of today, the second argument of append inside of React Native is typed as FormDataValue (not FormDataPart) which is typed as any so it shouldn't conflict with any typings from Flow.
Most helpful comment
Issue was labeled as stale, however as of latest react-native version, this is still an issue.