Differences Between Vue.js and NativeScript
Before you get too far down into NativeScript, let’s point out a few differences between traditional Vue.js development and NativeScript development. For starters, you are not writing HTML. You are writing these HTML-like tags that are really components that convert into native components. For instance, if you want a <p>
, in NativeScript you are actually going to write <Label />
instead. The reason being is that <p>
does not convert well into the native UILabel
and Label
components for iOS and Android, respectively. Another caveat is instead of using v-on:click
for click events, you are using the @tap=""
event for tap events.
Lastly, all of the template markdown in a traditional Vue.js application is actually using string literals instead of the <template />
component in the single-file Vue component format. All of your methods and logic will live above the template
still in the form of methods
, computed...