nativescript-vue
NativeScript-Vue now supports Vue 3 and is generally available! This version brings improved reactivity, a modern plugin system, and better TypeScript support.
Quick Start
To get started, you can use the StackBlitz Template.
Or, set up locally:
ns create myAwesomeApp --template @nativescript-vue/template-blank@latest
cd myAwesomeApp
ns run ios|android
Upgrading to v3
Please refer to our Upgrade Guide.
Using Vue Devtools
Install the standalone devtools in your app (it is not pulled in by nativescript-vue because it depends on Electron):
npm i -D @vue/devtools@^8
Then run with the vueDevtools flag. The devtools window opens on the host
machine and the app connects to it:
ns run ios|android --env.vueDevtools
A free port from 8098 up is picked automatically; pass --env.vueDevtoolsPort=9000
to pin one, or --env.vueDevtoolsHost=http://192.168.1.10 to reach the
devtools from a physical device. --env.vueDevtoolsSpawn=false skips
launching the devtools app, for when one is already running, and
--env.vueDevtoolsDebug logs the socket traffic between app and devtools.
🛠️ Android Users:
To allow Vue Devtools to connect, enable cleartext HTTP traffic in your AndroidManifest.xml:
<application ...
+ android:usesCleartextTraffic="true"
.../>
TypeScript
Types for every core element, $navigateTo, $showModal and friends ship
with the package. Third-party libraries such as Pinia or vue-i18n augment the
vue module, and code often imports from vue. The templates map vue to
nativescript-vue in tsconfig.json so both resolve; add this to existing
projects:
{
"compilerOptions": {
"paths": {
"vue": ["./node_modules/nativescript-vue"]
}
},
"vueCompilerOptions": {
"lib": "nativescript-vue"
}
}
Issues
If you encounter any issues, please open a new issue with as much detail as possible.
Looking for V2?
The V2 version has been moved to the v2 branch
Related Packages
Checkbox: Material 3 MaterialCheckBox on Android, SF Symbols toggle button on iO...
An unified permissions API for NativeScript on iOS and Android.
Alternative to the built-in NativeScript Label but with better performance and a...
Declarative API exposing platform native touch and gesture system to NativeScrip...
Version History
| Version | Released | License |
|---|---|---|
| 3.1.2 | MIT | |
| 3.1.1 | MIT | |
| 3.1.0 | MIT | |
| 3.0.3 | MIT | |
| 3.0.2 | MIT | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.9.3 | MIT | |
| 2.9.2 | MIT | |
| 2.9.1 | MIT | |
| 2.9.0 | MIT | |
| 2.8.4 | MIT | |
| 2.8.3 | MIT | |
| 2.8.2 | MIT | |
| 2.8.1 | MIT | |
| 2.8.0 | MIT | |
| 2.7.2 | MIT | |
| 2.7.1 | MIT | |
| 2.7.0 | MIT | |
| 2.6.4 | MIT | |
| 2.6.3 | MIT | |
| 2.6.2 | MIT | |
| 2.6.1 | MIT | |
| 2.6.0 | MIT | |
| 2.5.1 | MIT | |
| 2.5.0 | MIT | |
| 2.4.0 | MIT | |
| 2.3.0 | MIT | |
| 2.2.2 | MIT | |
| 2.2.1 | MIT |
Showing the latest 30 of 88. See every release on npm
Pre-releases (44)
| Version | Released | License |
|---|---|---|
| 3.0.0-rc.3 | MIT | |
| 3.0.0-rc.2 | MIT | |
| 3.0.0-rc.1 | MIT | |
| 3.0.0-beta.11 | MIT | |
| 3.0.0-beta.10 | MIT | |
| 3.0.0-beta.9 | MIT | |
| 3.0.0-beta.8 | MIT | |
| 3.0.0-beta.7 | MIT | |
| 3.0.0-beta.6 | MIT | |
| 3.0.0-beta.5 | MIT | |
| 3.0.0-beta.4 | MIT | |
| 3.0.0-beta.3 | MIT | |
| 3.0.0-beta.2 | MIT | |
| 3.0.0-beta.1 | MIT | |
| 3.0.0-beta.0 | MIT | |
| 3.0.0-dev.4 | MIT | |
| 3.0.0-dev.3 | MIT | |
| 3.0.0-dev.2 | MIT | |
| 3.0.0-dev.1 | MIT | |
| 3.0.0-dev.0 | MIT | |
| 2.9.1-rc.0 | MIT | |
| 2.5.0-alpha.3 | MIT | |
| 2.5.0-alpha.2 | MIT | |
| 2.5.0-alpha.1 | MIT | |
| 2.5.0-alpha.0 | MIT | |
| 2.4.0-alpha.0 | MIT | |
| 2.3.0-rc.2 | MIT | |
| 2.3.0-rc.1 | MIT | |
| 2.3.0-rc.0 | MIT | |
| 2.0.0-rc.0 | MIT |
Showing the latest 30 of 44. See every release on npm