BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News NativeScript 5.0 Brings Better Developer Experience and More Native Features

NativeScript 5.0 Brings Better Developer Experience and More Native Features

The latest release of NativeScript includes a number of changes, such as improved support for Vue.js, better developer experience, and more native features. Additionally, NativeScript 5.0 includes the new NativeScript-Schematics, an Angular extension helping developers to build web and mobile versions of an app from a single project.

On the front of developer experience, the major improvements in NativeScript 5.0 are the following:

  • Hot Module Replacement (HMR), aiming to shorten development cycles by enabling hot reload of modified modules without requiring application restarts and keeping the current state of your app. HRM can be enabled using the --hrm command line flag to tns:

    tns run ios|android –hmr


    (Image from NativeScript blog)

  • Interactive tns create, helping developers through the process of creating a new app and choosing the app style and the template they would like to use. The command will ask the user for their preferred language, pure JavaScript or TypeScript; for the UI framework they would like to use, either Angular or Vue.js; and finally, for the template, Blank, Hello World, SideDrawer, or Tabs.

  • Plugin creation from the CLI, using tns plugin create, which represents a great improvement over having to clone the NativeScript plugin seed repository.

  • Better code-test-debug cycle, through LiveSync and debug improvements. LiveSync, a tool to live update your app on a physical device, should reduce launch time by 20–30%. Related to this, app preview in the Playground Preview app can be now triggered from the CLI.

As mentioned, NativeScript 5.0 also improves native features:

  • iOS Safe Area is now supported, thus enabling full use of display on the iPhone X series of devices without user content interfering with the “notch”.
  • Android Support library has been brought to v28 from v26-alpha. This will require developers to install v28 on their development devices.

Another notable change in NativeScript 5.0 is better support for Vue.js, thanks to improved wrappers of all NativeScript UI components.

The NativeScript team also announced their plans for the next release, 5.1, expected for Christmas. Main highlights of the coming version are support for Angular 7, and more improvements to hot module replacement.

Rate this Article

Adoption
Style

BT