Open Lelelo1 opened 5 years ago
They are now picked
But assigning a method to onLoaded
(and possibly in other cases as well) - still reassigns the nativescript method causing a crash - when they should only assign to the react-nativescript prop.
I will rename onLoaded
to loaded
as a temporary fix.
I will rename
onLoaded
toloaded
as a temporary fix.
No. As it effects more than one method. The problem appears to be that any nativescript property can be changed in the jsx - regardless of the props actually set on the react component. It's possible to change the backgroundcolor even though the prop has been removed.
So in the the case of onLoaded
both the nativescript implementation and the react-nativescript runs.
both the nativescript implementation and the react-nativescript runs.
Currently I have tried to reproduce in react-nativescript with react-nativescript components, they don't have props on them though and I can't set any property in the jsx. _StackLayout
, _GridLayout
for example.
I can however remove the backgroundColor
in NativeScriptComponentTypings
and still be able to set a color in the $StackLayout
, $GridLayout
- which is similar to what I found out in rns-reactify
A problem when picking the nativescript props is that the props of the plugins will not be included. So I will go without picking props for now.
Currently all properties of the NativeScript component are added to the reactified component. Only some of them should be made be available in the jsx. They are currently here made by hard worker @shirakaba
This issue currently causes a crash when adding an event handler to onLoaded in jsx. Looking at the method signature - i'ts invalid to that found in rns:
reactified component:
a component in rns: