-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issues with Typescript + React native #86
Comments
Hmm, maybe:
But I'm wondering if this is a good practice |
I'm largely ignorant of TS, so don't feel like I can make a judgement call on this. First check other React component libs, and if it seems like something people do, I'd be happy to accept a PR with this change. |
Extra props is a duplicate of #79, it's fixed on master already. @rafaelcorreiapoli I've never used react-native but looking a the definitions, Surely other libraries (compatible with both react and react-native) encountered this problem already. Do you know of any good example we can take inspiration from? |
styled-components is a library compatible with both react and react-native (and it has completely different implementations for each one). The way it's API works is by exposing functions from |
Hello there! Are there any updates on this issue? |
One more issue with React native. onPress and handleSubmit
|
Published fix in |
Are you submitting a bug report or a feature request?
Feature request
What is the current behavior?
Type errors with react-native + typescript
What is the expected behavior?
No type errors :P
What's your environment?
I'm using react-final-form with react-native
Other information
There are two situations where I have type errors.
1. handleSubmit
The current type for handleSubmit is:
How can we deal with this in react-native?
onPress events of touchables have this signature:
2. Field extra props
Sometimes we need to pass some extra props to the underlying component of Field
In this case, the
style
prop is the extra one.The type system complains because the props that Field is expecting are:
Maybe we should allow anything here? :\ 👎
The text was updated successfully, but these errors were encountered: