preact-nativescript-components
by hizoul | v0.0.7-2
preact components for nativescript
npm i --save preact-nativescript-components
  • Version: 0.0.7-2
  • GitHub:
  • Downloads:
    • Last Day:   0
    • Last Week:  12
    • Last Month: 49

preact-nativescript-componentsBuild Status Coverage Status dependencies npm

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>
)
}
})

List of importable Components