The webpack feature Hot Module Replacement should now also provide in NativeScript for reduced update times and constant states of the apps.
Version 5.0 of the cross-platform development framework NativeScript has been released. In the fifth major release, developers can try out the “Hot Module Replacement” command in a beta release. In addition, all user interface (UI) components now support the Vue.js. framework. There is also an extension to the tns create command, and tns preview is now executable from the command line.
Hot Module Replacement is a feature of the module bundler webpack. It allows you to replace modules in a bundled application during the lifetime of an app. By integrating with NativeScript, creators expect a reduced update time when modifying files and getting the app state between reboots. Developers can run the feature using the tns run ios | android –hmr command . The GitHub issue on the topic provides information about the other plans at the command.
Preview command in the command-line interface
In addition, NativeScript users can now use the tns preview command to preview their app. NativeScript then outputs a QR code that allows users to use their device to scan the NativeScript Playground app. The tool then automatically generates a preview of the written application. The command should also enable Windows users to preview iOS devices.
NativeScript and Vue.js
A big wish of the community was to further improve the cooperation between NativeScript and Vue.js. As part of the new release, the creators have reworked the wrappers for all NativeScript UI components and added more demos and examples into the documentation. A complete list of the new features can be found in the NativeScript blog.