
Native UIs using Vue.js and NativeScript - lobo_tuerto
https://nativescript-vue.org/
======
sumedh
> Sample apps: We’re looking for people to put this plugin through its paces
> and send feedback our way.

Maybe they should build some sample apps before telling others to use the
framework.

------
jaequery
this is amazing! native script is just superior to react native in so many
ways, always wanted to try but now that its paired with vue i may just jump
head in!

from what i hear, native script is more native than react native, 100% cross
platform from ios and android, and much more performant than React Native.

i can see this becoming a real contender very soon.

~~~
pka
> native script is just superior to react native in so many ways

Could you elaborate? If true that's amazing!

~~~
jkulubya
I wouldn’t say it’s more native, however, NativeScript gives you access to the
entire API space of the target platform in JavaScript versus React Native
which doesn’t. What this means is that if something doesn’t exist in NS land,
you can open the Android or iOS docs and call the required api from JavaScript
like so

    
    
      var context = ...;
      var button = new android.widget.Button(context);
      button.setText("My Button");
    

To achieve the same in RN, you have to drop down into Java/Swift/Obj-C and
link back to your JavaScript. Same result, different means.

See [https://docs.nativescript.org/core-concepts/accessing-
native...](https://docs.nativescript.org/core-concepts/accessing-native-apis-
with-javascript)

------
jeswin
Apps running inside a JS vm on iOS or Android are not "truly native".
Misappropriating an existing term (native app) to include such a design is
uninviting; not even necessary.

There are so many ways in which this is inferior to native code. And I say
this as someone who works primarily with JavaScript.

~~~
Mayzie
To be fair, "native" in this sense is exposing platform native UI components
and libraries, which gives apps a native look and feel because, well, they
_are_ native. For most apps that's all you'll ever need, and the performance
overheard of running JS is negligible. For any performance critical code, you
can write them in the platforms native code and interface with them via
JavaScript.

Unfortunately though, so many developers do not know how to write in the
platforms preferred native language and you end up with components, like most
of those listed on awesome-react-native[1], where they're entirely written in
JS which:

* sometimes emulate the native look and feel (often poorly), not _are_ the look and feel, and,

* as a result, often perform super poorly compared to their native counterparts, and,

* if emulating the native look and feel, and not implementing their own design/UI (which most do), that look and feel can break between OS upgrades and feel out of place, and,

* often don't distinguish between platforms (i.e. the developer won't bother implementing the look and feel for Android, where the component is entirely compatible).

[1] - [https://github.com/jondot/awesome-react-
native](https://github.com/jondot/awesome-react-native)

~~~
wlesieutre
My experience with React Native was that it _doesn 't_ consistently use native
UI components, it uses UIViews that people have cobbled together into their
own replications of varying quality.

So if you want a big grid of items, you're not using a UICollectionView,
you're reimplementing it yourself or finding someone else's attempt at that.

Maybe this is because a UICollectionView doesn't have an identical counterpart
on Android so it's easier to just redo it from scratch? But I'd be surprised
if the performance of these things is as good as the _real_ native ones, even
if they make it out of UIViews.

My other big complaint is that it doesn't help you with UI size classes. iOS
apps change their layout depending on (generally) whether you're on an iPad
(fullscreen / large split), or iPhone (and iPad small split, which is iPhone
sized but much taller). The two weird exceptions being the iPad Pro having two
full sized splits, and the Plus sized phones acting sort of iPad-like in
landscape view.

Anyone have an example of a React Native app that follows those conventions
correctly? Last I checked the Facebook app (which I assume is something of a
canonical example) doesn't even support split screen, and iOS 9 came out in
2015.

This was a year or so ago that I was poking around at it, things may have
improved since then?

~~~
andrewingram
The main Facebook app isn't React Native (though parts of it might be)

~~~
wlesieutre
Ah, interesting. I just assumed that's what they made it for.

------
Justsignedup
Call me ignorant, but isn't Vue.js effectively what backbone and ember were
trying to do all those years back? Feels like React sort of changed the
paradigm for the better. ::shrug::

------
mihaela
This is the 100th thing claiming to be native when it's not. Like putting a
"native" in it's name does not make it so.

------
saagarjha
I'm not quite impressed with the images I found online[1]. Does anyone have an
example of a well-written that looks native using this?

[1]:
[https://duckduckgo.com/?q=nativescript+vue&t=hf&iax=images&i...](https://duckduckgo.com/?q=nativescript+vue&t=hf&iax=images&ia=images)

~~~
sect2k
[https://www.nativescript.org/showcases](https://www.nativescript.org/showcases)

This is a showcase for NativeScript in general, but AFAIK what you can do with
NS, you can do with NS+Vue.

The one thing I really like about NS is that it give you full access to native
platform APIs in JavaScript.

------
pavlov
Seems to be like React Native except with Vue instead?

~~~
k__
RN probably integrates better with React than NativeScript with Vue.

You can also use Angular with NS, which workes much different than Vue.

~~~
bpicolo
Weex is another RN equivalent for Vue:

[https://weex.incubator.apache.org/](https://weex.incubator.apache.org/)

Not nearly as mature as RN though.

~~~
deadcoder0904
Weex is adopted well in the Chinese Community. From what I hear, its used in
Alibaba (E Commerce site of China like Amazon) products. Its mature but you
won't find well-written docs in English.

------
laurent123456
That seems like a very ambitious project, is there any company behind this?
Otherwise I'm not sure it will work over the long term. Even React Native with
Facebook (and Microsoft) behind it and years of development, it still feels
like a beta product and many features are still missing. I wish an independent
project could do better than that but it's unlikely.

~~~
jkulubya
Progress ([https://www.progress.com/](https://www.progress.com/)) is behind
NativeScript, and officially supports the two usual NativeScript stacks (plain
JavaScript/Typescript & Angular). NativeScript + Vue is a community driven
project that seems to be on its way to also being officially supported by
Progress.

------
deadcoder0904
I personally feel nothing is as close as React Native right now. Whether it be
Flutter or NativeScript or Weex. It will still require some time to mature as
much as React Native is today.

------
gremlinsinc
Looks pretty sweet, I've been wanting a React Native like stack but with Vue
as I much prefer working in Vue over React personally. I'll definitely have to
try this out.

------
kyriakos
Still has the same single thread limitations of react native?

~~~
thebigspacefuck
The UI and JS run on the same thread, but you can offload some work to worker
threads: [https://docs.nativescript.org/angular/core-
concepts/multithr...](https://docs.nativescript.org/angular/core-
concepts/multithreading-model)

------
gagabity
So does this also bundle a Javascript engine on Android to execute the code
the same way RN does?

------
kyle_martin1
For the love of God, we don't need anymore JS "native" app frameworks. Just
learn Swift and Java like a competent engineer would.

~~~
mephitix
Nah we need them for cross platform. But yes, learn Swift and Kotlin anyway!

~~~
antoniuschan99
Kotlin Native is progressing well?

