When to Use Observable Arrays in NativeScript Core, Angular, and Vue

preview_player
Показать описание
In this installment of iScriptNative, I compare 3 apps, NativeScript Core, Angular, and Vue, and show you which require the ObservableArray.

Typically we bind the ListView and Repeater components to a JavaScript array in NativeScript, but it's not always clear when you should use a regular JavaScript array or ObservableArray. What is so observable about it anyway? That's what you'll learn here.

► SHARE
Share this video with a friend to help them with their native VueJS or native Angular iOS and Android apps:

Share the entire NativeScript playlist to help your friends with their native iOS and Android apps written with JavaScript:

► ASK
If you have a topic you want me to make a video about use #iscriptnative in the comments.

►LET'S CONNECT

► FREE + PREMIUM NATIVESCRIPT COURSES
Take 25% off any premium NativeScript course by using the coupon code YOUTUBE
Рекомендации по теме
Комментарии
Автор

When do you use the NativeScript ObservableArray? Do you use them in NativeScript with Angular or Vue?

AZisk
Автор

You saved me with this one once again.

SK-ybbx
Автор

Thank you for having started to create regular free content.

burnblue
Автор

Simple and coincise. Coming from a WPF and VueJs background, everything made perfect sense. Anyone using an ObservableArray in a vueJs application would basically be "overeacting" Lol

hocahaenyi
Автор

Thank Alex for this explanation you really helped us so many times
I just like the new way of making this video to show how to make it with all flavors
Keep going

mohammedalarayshi
Автор

Doesn't matter which flavor of NativeScript you use. But you have to use an Observable array for lists where you add/remove items incase you use RadListView. Because RadListView was built specifically for ObservableArray of tns-core-modules. If you don't use ObservableArray with RadListView, everytime you add a new item, the loaded event fires for every single item in the list view. And there are several other issues you can run into.

However, if you are using Angular/Vue and are working with a ListView (and not RLV), then you can use a regular array. :)

Cheers! Thanks Alex ♥

MultiShiv
Автор

What is the difference between ObservableArray & VirtualArray. Please make a details video about NS core Observable, ObservableArray, VirtualArray and fromObject. 😀😀

rrahman-hn
Автор

Hi Alex, Is using rxjs subscription an overkill for nativescript mobile apps ?

rajeshkp
Автор

I am learning N and am gonna use observable arrays to update a list, if I use it this way wouldn't it increase the memory use of the app? Let say u have thousands of elements need to be inserted in the UI that's gonna be a killer for the app..
If u you come from the web we only update the DOM element, appending the incoming data to the element without using an array..
Hopelly someone answer me regards.

RADIOSCATRACHASUTAN
visit shbcf.ru