Lelelo1 / rns-reactify

0 stars 0 forks source link

VSCode warning complaints when used in jsx #1

Closed Lelelo1 closed 5 years ago

Lelelo1 commented 5 years ago

VSCode warning complaints when used in jsx:

Screenshot 2019-09-30 at 09 25 44

...while all props set seems to function

export const MyContentView = JSX<ContentView>(new ContentView());

Lelelo1 commented 5 years ago

The NativeScript component props all has to be set as optional props:

Screenshot 2019-10-07 at 20 10 07

Lelelo1 commented 5 years ago

Getting new issues when setting props on StackLayout and ScrollView.

Lelelo1 commented 5 years ago

I need to set the return type of Reactified to React.ComponentType. However doing so I can't return the proper react.forwardRef that fits the description - getting typescript error. This seems to be due to how ExtraProps is conditionally set up

Lelelo1 commented 5 years ago

The jsx is type error free with Reactified return type of React.ComponentType<Partial<T> & ExtraProps<T>>. But there is a type error when using conditional generically assigned props in Reactified: https://stackoverflow.com/questions/58281936/react-componenttype-with-generic-conditional-props - when trying to return React.forwardedRef;