Advanced Concepts
Best Practices
Over the years several distinct best practices have emerged when working with NativeScript and we'd like to outline a few here for you in hopes that you can enjoy NativeScripting as much as we do. More importantly though, that your end product gives you all the right feels you expect.
The story of 😢 or 😊
We are providing a sample "vanilla" NativeScript app which shows some of the bad vs. good practices for you to run and see for yourself. Using vanilla NativeScript is a great way to see the raw examples of why these are bad and good practices which are applicable to any frontend framework integration. Each framework integration effectively utilizes these same practices for it's own various cases.
Clone and see for yourself: https://github.com/NativeScript/examples-best-practices
View bindings
ListViews
hidden, visibility, v-if, ngIf and all those "if" things
Rogue timers and intervals
Various usages of @NativeClass() decorator
Android tips
iOS tips
.ios and .android files or platform conditionals?
Optimizing Images
- Previous
- Accessibility
- Next
- Multithreading