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