Closed Lelelo1 closed 5 years ago
~I may have made children
mandatory for that component (evidently a bad idea); does the error resolve upon adding a child component?~
Wait, forget that, I misread it.
See at the end of the error message that the rows
and columns
properties are missing.
In NativeScript Core, those are optional, but in React NativeScript, I set them up as mandatory. I'll have to amend that. In the meantime, you should write:
<$GridLayout rows={[]} columns={[]}>
</$GridLayout>
See my sample app for examples of how to fill in the rows
and columns
properties on GridLayout in React NativeScript v0.11.0:
https://github.com/shirakaba/rpstrackerrns/blob/master/app/views/pages/detail/DetailPage.tsx#L604
In a future version of RNS, I'd like to accept strings instead of the strongly-typed ItemSpecs here, as they're very annoying to write out.
Yes the following worked:
<$GridLayout rows={[]} columns={[]}>
</$GridLayout>
Using
"react-nativescript": "^0.11.0",
. And there appears to be no problem creating GridLayouts in componentDidMount and adding them.