I am working on a React Native project. On some tutorials I have seen to bind a method like this:
constructor(props){
super(props);
this.my_function = this.my_function.bind(this);
}
My question is if I can access the function in constructor using this.my_function
then why I need to bind this again? I have Java and Python background, may be that's why I am confused with this type of method binding.
Note: I know that if I don't bind a method in React Native/React JS my method won't work correctly. I just want to know why I need this extra binding.