0.0.7-2 • Published 6 years ago
preact-nativescript-components v0.0.7-2
preact-nativescript-components
preact-nativescript-components was made to use JSX-Syntax for preact-to-nativescript components
Usage
You should mostly be able to import and use the NativeScript UI Components by name e.g.
import application from "tns-core-modules/application"
import { render } from "preact-to-nativescript"
import {
ActionBar, ActionItem, Button, Label, Page, ScrollView, StackLayout
} from "preact-nativescript-components"
application.start({
create: () => {
return render(
<Page>
<ActionBar>
<StackLayout>
<Label>Custom Header</Label>
</StackLayout>
<ActionItem text="act" />
</ActionBar>
<StackLayout>
<Label>PageContent</Label>
<Button text="Button" />
</StackLayout>
</Page>
)
}
})