Examples for pure JavaScript?


#1

Are there any examples on pure JavaScript?. I see only examples for TypeScript and Angular.


#2

Maybe this can help you:
https://github.com/Icenium/NativeScript-Sample-UI-Examples


#3

Are you looking for anything particular?


#4

No. Just examples for getting start, because docs contain only examples for TypeScript.


#5

But TypeScript IS JavaScript…


#6

TypeScript is NOT JavaScript. JavaScript IS TypeScript, but not vice versa.
And I don’t know TypeScript syntax. So it’s not comfortable to use it for me.


#7

TypeScript is of course JavaScript. It mostly uses modern JavaScript (ES6) syntax, which is already supported in almost all modern browsers. My humble opinion would be, it’s time for you to migrate / learn. Obviously you can’t still expect everything in ES5.

If at all you have problem in understanding TypeScript code, you may at least use online transpiler like typescriptlang.org/play/index.html


#8

Mostly does not mean equal/fully/exactly. Otherwise, about a large number of things you could say that this is the same thing.

But I will certainly try, when I will have time for this.


#9

Hi lokomoko. I, like you am more familiar with vanilla JavaScript. There was enough on the {N} web site to get me far enough along to do an (demo right now) app for a client including some http requests to backend APIs.

On the NativeScript website, choose ‘Get Started’ and then ‘Get Started with JavaScript’ button.

https://docs.nativescript.org/tutorial/chapter-0

Vanilla JavaScript only :slight_smile:

It’ll take you through the basics and then have you build a grocery list app - all in JS. Once you get the hang of the structure of the files and the MVVM way of working, your own JS skills should help you out. It would be worth knowing about the CommonJS standard if you haven’t worked with this before. It can (at least it was for me) be daunting getting it going initially but I found most of my problems came from installing all the dependencies than with the code.

Also StackOverflow and this forum are your friends - good luck! I’m still not an expert but I LOVE working with NativeScript - hope you do to!

If you check out StackOverflow under my Wittner username you’ll see some of the stuff I had problems with starting out - might help.

cheers

Wittner


#10

as a p.s. to the above. I’m going to try to get to grips with TypeScript in the near future. Although I was never a fan of say, CoffeeScript, I think that TypeScript is pretty much what vanilla JavaScript is going to look like in the near future so I don’t think it would hurt to learn it, but I also prefer to write in JS as it is now - at least for the moment.