ConfigsApr 15, 2026·3 min read

NativeScript — Build Truly Native iOS and Android Apps with JavaScript or TypeScript

NativeScript lets you build iOS and Android apps with one JavaScript/TypeScript codebase that renders to native UI widgets (not WebView). Direct access to every iOS and Android API from JS.

TL;DR
NativeScript lets you build native iOS and Android apps with JavaScript/TypeScript using native UI widgets and direct access to every platform API.
§01

What it is

NativeScript is an open-source framework for building native iOS and Android apps with JavaScript or TypeScript. Unlike hybrid frameworks that wrap web content in a WebView, NativeScript renders actual native UI widgets. It provides direct access to every iOS and Android API from JavaScript, with no bridge overhead for simple API calls.

NativeScript targets mobile developers who want native performance and platform API access while writing in JavaScript or TypeScript. It supports Angular, Vue, Svelte, and React as UI frameworks, or you can use plain TypeScript.

§02

How it saves time or tokens

NativeScript uses one codebase for both iOS and Android while rendering native UI components. You avoid maintaining separate Swift/Kotlin codebases. Direct API access means you call platform APIs from JavaScript without writing native plugins for common tasks. The CLI provides hot reload during development, and the framework handles platform-specific adaptations automatically.

§03

How to use

  1. Install the CLI with npm install -g @nativescript/cli and run ns doctor to verify your development environment (Xcode, Android SDK).
  2. Create a new app with ns create hello --template @nativescript/template-blank-ts.
  3. Run on a simulator or device with ns run ios or ns run android.
§04

Example

# Install CLI
npm install -g @nativescript/cli
ns doctor

# Create app with TypeScript template
ns create my-app --template @nativescript/template-blank-ts
cd my-app

# Run on iOS simulator
ns run ios

# Run on Android emulator
ns run android
// app/main-view-model.ts
import { Observable } from '@nativescript/core';

export class MainViewModel extends Observable {
  private _counter = 0;

  get message(): string {
    return `Tapped ${this._counter} times`;
  }

  onTap(): void {
    this._counter++;
    this.notifyPropertyChange('message', this.message);
  }
}
§05

Related on TokRepo

§06

Common pitfalls

  • NativeScript requires Xcode for iOS builds and Android SDK for Android builds. You cannot build iOS apps on Windows or Linux.
  • Some npm packages that rely on browser APIs (DOM, window) do not work in NativeScript. Check plugin compatibility before depending on web-oriented packages.
  • Performance-sensitive animations should use the NativeScript animation API rather than JavaScript timers. The animation API runs on the native UI thread.

Frequently Asked Questions

How does NativeScript differ from React Native?+

Both render native UI, but NativeScript provides direct access to every platform API from JavaScript without bridges for simple calls. React Native uses a bridge (or the new architecture with JSI) for native communication. NativeScript supports Angular, Vue, Svelte, and React, while React Native is React-only.

Can I use npm packages with NativeScript?+

Yes, as long as they do not depend on browser-specific APIs like DOM or window. Many npm packages for business logic, data processing, and networking work fine. NativeScript-specific plugins are available for native device features.

Does NativeScript support hot reload?+

Yes. The NativeScript CLI provides HMR (Hot Module Replacement) during development. Changes to TypeScript, CSS, and XML files are reflected on the device or simulator without a full rebuild.

Is NativeScript free?+

Yes. NativeScript is fully open-source under the Apache 2.0 license. There are no paid tiers for the framework itself. Some third-party UI component libraries offer premium components.

What UI frameworks work with NativeScript?+

NativeScript supports Angular, Vue.js, Svelte, React, and plain TypeScript/JavaScript. Each framework flavor has its own project template and component syntax while sharing the same native rendering engine.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets