Why I chose NativeScript?

After looking at several alternates (see this and several other comparisons on the web), in order to leverage maximum code reuse and not rewrite our app completely for mobile platforms, it came down to 2 choices -

Hybrid PWA app with Ionic

Native app with NativeScript

The easiest choice would have been to go with the hybrid approach and use Ionic as it would have required less effort and leveraged the existing tech stack to accomplish this. For me however, performance was a big consideration, especially for a growing game app like ours, so I decided to go with NativeScript.

The vast majority of code changes would involve rewriting the components, along with it’s templates and css, since NativeScript uses a markup language in XML format that is different from HTML to compose the UI for the native platforms.

In addition, since the firebase plugin for NativeScript has a different API surface, we’ll create an interface for interacting with Firebase with different implementations for web and mobile. We can then inject the appropriate implementation based on the platform.