The four, and only four rules about this
Using the new keyword for creating new objects. In that case the this will be bound to the new created object.
Hints and tips for better programming with the React Native framework
Based on my current experience with the React Native framework, I would like to share with you some hints and tips that will improve your skills in the way you develop with the framework.
Isolate the business logic of your application from the UI/ components code
Let’s talk about scope
In general, the scope in a programming language affects the visibility of fields/ properties in a class/ module or of the arguments passed or the variables declared inside a function. There are two main categories of scope in the modern languages:
The block scope, where for example a variable is only visible inside an if condition or a for loop, when this variable is declared inside this condition. C# uses this type of scope.
The function scope, where a variable is visible and can be used inside the whole function. The variable remains visible only inside the function and not outside of it.